jumboframe

Untitled

Apr 22nd, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. currency=float(input())
  2. fromCurr=input()
  3. toCurr=input()
  4.  
  5. def getRate(argument):
  6.     switcher = {
  7.         "BGN": 1.00,
  8.         "USD": 1.79549,
  9.         "EUR": 1.95583,
  10.         "GBP": 2.53405
  11.     }
  12.     return switcher.get(argument, "nothing")
  13.  
  14. money=currency*getRate(fromCurr)
  15. fx_money=money / getRate(toCurr)
  16.  
  17. print("%.2f"%(fx_money))
Add Comment
Please, Sign In to add comment