Advertisement
Guest User

Untitled

a guest
Sep 19th, 2019
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.78 KB | None | 0 0
  1. currency_from = input(
  2.         "What currency would you like to convert from? "
  3.         "Type the name of currency in the next line (uah, usd, eur)\n>. "
  4.     ).lower()
  5.  
  6.     currency_to = input(
  7.         "What currency would you like to convert to? "
  8.         "Type the name of the currency ({0})\n > ")
  9.  
  10.     if currency_from == "uah".lower():
  11.         print("you have chosen uah!")
  12.         uah = float(input("Input your amount in Hryvnas.:"))
  13.         usd = uah * 0.04
  14.         eur = uah * 0.08
  15.         print(uah, "uah is equal to:")
  16.  
  17.         if currency_to == "usd":
  18.             print("usd", usd)
  19.  
  20.         elif currency_to == "eur":
  21.             print("eur", eur)
  22.  
  23.     elif currency_from == "usd":
  24.         print("YOU have CHOSEN USD!")
  25.         usd = float(input("Input your amount in Dollars"))
  26.         uah = usd * 113.76
  27.         eur = usd * 0.92
  28.         print(usd, "usd is equal to:")
  29.  
  30.         if currency_to == "uah":
  31.             print("uah", uah)
  32.         elif currency_to == "eur":
  33.             print("eur", eur)
  34.  
  35.     elif currency_from == "eur":
  36.         eur = float(input("Input your amount in Euros: "))
  37.         usd = eur * 1.09
  38.         uah = eur * 324
  39.         ##currency_to = input("Do you want that in uah, usd?")
  40.         print(eur, "EUR is equal to:")
  41.  
  42.         if currency_to == "uah":
  43.             print("uah", uah)
  44.         elif currency_to == "usd":
  45.             print("usd", usd)urrency_from = input(
  46.         "What currency would you like to convert from? "
  47.         "Type the name of currency in the next line (uah, usd, eur)\n>. "
  48.     ).lower()
  49.  
  50.     currency_to = input(
  51.         "What currency would you like to convert to? "
  52.         "Type the name of the currency ({0})\n > ")
  53.  
  54.     if currency_from == "uah".lower():
  55.         print("you have chosen uah!")
  56.         uah = float(input("Input your amount in Hryvnas.:"))
  57.         usd = uah * 0.04
  58.         eur = uah * 0.08
  59.         print(uah, "uah is equal to:")
  60.  
  61.         if currency_to == "usd":
  62.             print("usd", usd)
  63.  
  64.         elif currency_to == "eur":
  65.             print("eur", eur)
  66.  
  67.     elif currency_from == "usd":
  68.         print("YOU have CHOSEN USD!")
  69.         usd = float(input("Input your amount in Dollars"))
  70.         uah = usd * 113.76
  71.         eur = usd * 0.92
  72.         print(usd, "usd is equal to:")
  73.  
  74.         if currency_to == "uah":
  75.             print("uah", uah)
  76.         elif currency_to == "eur":
  77.             print("eur", eur)
  78.  
  79.     elif currency_from == "eur":
  80.         eur = float(input("Input your amount in Euros: "))
  81.         usd = eur * 1.09
  82.         uah = eur * 324
  83.         ##currency_to = input("Do you want that in uah, usd?")
  84.         print(eur, "EUR is equal to:")
  85.  
  86.         if currency_to == "uah":
  87.             print("uah", uah)
  88.         elif currency_to == "usd":
  89.             print("usd", usd)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement