YankoGrancharov

Untitled

May 22nd, 2017
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. x = float (input())
  2. ins = input()
  3. ou = input()
  4. tem = x
  5.  
  6. us = 1.79549
  7. eu = 1.95583
  8. gb = 2.53405
  9.  
  10. if ins == 'usd':
  11.     tem = x * us
  12. elif ins == 'gbp':
  13.     tem = x * gb
  14. elif ins == 'eur':
  15.     tem = x * eu
  16. if ou == 'usd':
  17.     tem = tem / us
  18. elif ou == 'gbp':
  19.     tem = tem / gb
  20. elif ou == 'eur':
  21.     tem = tem / eu
  22.  
  23. print ('{0:.2f}'.format(tem), ou)
Advertisement
Add Comment
Please, Sign In to add comment