Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. amount = float(input())
  2. currency_from = input()
  3. currency_to = input()
  4. rates_to_BGN = {
  5.     "USD": 1.79549,
  6.     "EUR": 1.95583,
  7.     "GBP": 2.53405,
  8.     "BGN": 1
  9.     }
  10. result = rates_to_BGN.get(currency_from)*amount/rates_to_BGN.get(currency_to)
  11. print(f"{result:.2f} {currency_to}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement