-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
할 **하지 * * 코드의 포스트 사진, 질문 코드에 * 서식있는 텍스트 *로 게시하십시오. –
"사용자가 원하는 양만큼 프로그램을 변환하지 못하는 문제가 있습니다."- 무엇이 문제입니까? –