#!/usr/local/bin/python
#coding=utf-8

import re
import change_to_earth_numerals

def get_answers(info, currency, price):
	"""
	"""
	print(info)
	for key, value in info.items():
		if key == 'question_lines':
			for i in value:
				roman_sum=''
				words_total=''
				material=''

				if re.search(r'^how much is',i) != None:
					for words in i.split(' '):
						if words in currency:
							valuerance=currency[words]
							words_total = words_total.join(['',words])
							words_total = words_total.join(['',' '])
							roman_sum=roman_sum.join(['',valuerance])

					earth_sum = change_to_earth_numerals.change_to_earth_numerals(roman_sum)
					print(words_total,'is',earth_sum)
				elif re.search(r'^how many Credits is',i) != None:
					for words in i.split(' '):
						if words in currency:
							valuerance = currency[words]
							words_total = words_total.join(['',words])
							words_total = words_total.join(['',' '])
							roman_sum = roman_sum.join(['',valuerance])

						earth_sum = change_to_earth_numerals.change_to_earth_numerals(roman_sum)
						if words in price:
							material_price = price[words]
							material = words
							total_price = earth_sum * material_price
					print(words_total,material,'is',int(total_price),'Credits')
				else:
					print('I have no idea what you are talking about')


if __name__ == "__main__":
    #get_answers()
    pass