Python_Matter/Solve

Python Learn the basics Quiz 32

AnKiWoong 2019. 5. 12. 19:15
반응형

Q>

사용자에게 예치금액을 입력 받아 1년 만기 정기 예금을 작성하시오.

이자 : 예치금액 * 1년

단, 출력물은 원금 / 이자 / 원리 합계를 출력하시오.


A>

won = int(input("1년만기 정기예금에 얼마를 예치하시겠습니까?"))

yaer = 0.1
isa = won * yaer
yisum = won + isa

print("원금 : {}".format(won))
print("이자 : {}".format(isa))
print("원리합계 : {}".format(yisum))

1년만기 정기예금에 얼마를 예치하시겠습니까?20000

원금 : 20000

이자 : 2000.0

원리합계 : 22000.0


Process finished with exit code 0

반응형