import all_constants as c def round_ans(val): # rounds to 2 decimal places return "{:.2f}".format(val) def to_usd(amount): answer = amount * c.NZD_TO_USD return round_ans(answer) def to_eur(amount): answer = amount * c.NZD_TO_EUR return round_ans(answer) def to_gbp(amount): answer = amount * c.NZD_TO_GBP return round_ans(answer) def to_jpy(amount): answer = amount * c.NZD_TO_JPY return round_ans(answer) def to_aud(amount): answer = amount * c.NZD_TO_AUD return round_ans(answer)