Advertisement
Guest User

exch

a guest
Apr 6th, 2020
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.75 KB | None | 0 0
  1. print("What would you like to exchange? Pick the number")
  2. print("1 - PLN to USD = 4.3PLN")
  3. print("2 - USD to PLN")
  4. print("3 - PLN to EUR = 4.5PLN")
  5. print("4 - EUR to PLN")
  6.  
  7. usd = 4.3
  8. eur = 4.5
  9.  
  10. pick = input() # wybor czy wymiana dolara czy eur
  11. amount = int(input()) #wpisanie kwoty do wymiany
  12. withdraw = int #ile zostanie wyplacone
  13.  
  14. if pick == "1":
  15.     withdraw = amount * usd
  16.     print("You will get: ", "$ " + str(withdraw))
  17. elif pick =="2":
  18.     withdraw = amount * usd
  19.     print("You will get: ", "PLN " + str(withdraw))
  20. elif pick == "3":
  21.     withdraw = amount * eur
  22.     print("You will get: ", "EUR " + str(withdraw))
  23. elif pick == "4":
  24.     withdraw = amount * eur
  25.     print("You will get: ", "PLN " + str(withdraw))
  26. else:
  27.     print()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement