Advertisement
adventuretimeh

dollaro in euro (aggiornato 2014)

Oct 23rd, 2019
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. EURO_TO_DOLLAR = 0.72 # Exchange rate on April 22, 2014
  2. dollars = raw_input("How many Dollars do you wish to convert to Euros? :")
  3. try:
  4.     dollars = float(dollars)
  5. except ValueError:
  6.     print dollars, "is not a number!"
  7. else:
  8.     print dollars, "dollars =", dollars * EURO_TO_DOLLAR
  9.     print "euros"
  10. print "Thank you!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement