-4
私はプログラムがユーザーが変換したいと思った量を表示しないという問題があります。また、どのように小数点第3位、任意のアイデアに丸めますか?通貨変換器
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
行い**ません* *コードのポストピクチャ、ポストコードとしての*書式付きテキスト*、質問自体。 –
"私はプログラムがユーザーが変換したいと思った量の量を表示しないという問題があります" - 何が問題なのですか? –