-4
我有一個問題,程序不會顯示用戶想要轉換的數量。另外你如何將數字四捨五入到小數點後三位,有什麼想法?貨幣轉換器
money = int(input("Enter the amount of money IN GDP you wish to convert :"))
USD = 1.25
EUR = 1.17
RUP = 83.87
PES = 25.68
currency = input("Which currency would you like to convert the money into?")
if currency == "USD":
print(money) * USD
elif currency == "EUR":
print(money) * EUR
elif currency == "RUP":
print(money) * RUP
elif currency == "PES":
print(money) * PES
這應該有助於四捨五入http://stackoverflow.com/questions/455612/limiting-floats-to-two-decimal-points – spijs
做**不* *在問題本身中發佈代碼圖片,發佈代碼爲*格式文本*。 –
「我有一個問題,程序不會顯示用戶想要轉換的數量」 - 問題是什麼? –