Advertisement
defbind_

Untitled

Aug 20th, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.46 KB | None | 0 0
  1. try:
  2.     print(" Euro == 1 \n Pound == 2 \n Dollar == 3")
  3.     user_amount = int(input("What's the currency you want sire? : "))
  4.     user_input = int(input("How much of that currency you want to convert? :  "))
  5.     print(" Euro == 1 \n Pound == 2 \n Dollar == 3")
  6.     convert_input = int(input("Whats the currency you want to convert it to, sire? : "))
  7. except ValueError:
  8.     exit("RIP you didn't enter a number, soz mate")
  9. def de():
  10.     out1 = user_input / 1.11
  11.     return out1
  12. def pd():
  13.     out2 = user_input * 1.21
  14.     return out2
  15. def dp():
  16.     out3 = user_input / 1.21
  17.     return out3
  18. def pe():
  19.     out4 = user_input * 1.09
  20.     return out4
  21. def ep():
  22.     out5 = user_input / 1.09
  23.     return out5
  24. def ed():
  25.     out6 = user_input * 1.11
  26.     return out6
  27. def ee():
  28.     out7 = user_input * 1
  29.     return out7
  30. def dd():
  31.     out8 = user_input * 1
  32.     return out8
  33. def pp():
  34.     out9 = user_input * 1
  35.     return out9
  36. if user_amount == 1 and convert_input == 1:
  37.     print(ee())
  38. if user_amount == 1 and convert_input == 2:
  39.     print(ep())
  40. if user_amount == 1 and convert_input == 3:
  41.     print(ed())
  42. if user_amount == 2 and convert_input == 1:
  43.     print(pe())
  44. if user_amount == 2 and convert_input == 2:
  45.     print(pp())
  46. if user_amount == 2 and convert_input == 3:
  47.     print(pd())
  48. if user_amount == 3 and convert_input == 1:
  49.     print(de())
  50. if user_amount == 3 and convert_input == 2:
  51.     print(dp())
  52. if user_amount == 3 and convert_input == 3:
  53.     print(dd())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement