我在编译器中打印我的程序时遇到了一些问题,我没有收到任何错误消息,但程序没有运行。我真的不明白为什么?
#1 USD = 0.7617 Euro
#1 Euro = 1.3128 USD
def currencyConvert():
userChoice = raw_input ("Vad vill du konvertera? 1)USD -> Euro 2) Euro -> USD")
if userChoice == "1":
userUSD = input ("Hur mycket vill du konvertera ange i USD?")
Euro = userUSD * 0.7617
print "USD %0.2f", userUSD, "= %0.2f", Euro, "Euro"
elif userChoice == "2":
userEuro = input ("Hur mycket vill du konvertera ange i Euro?")
USD = userEuro * 1.3128
print "%0.2f", userEuro, " Euro = USD %0.2f", USD
else:
print "error du angav fel val, försök igen ange val 1 eller 2"
currencyConvert()