본문 바로가기

Python_Matter/Solve

Python Learn the basics Quiz 32

반응형

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

반응형

'Python_Matter > Solve' 카테고리의 다른 글

Python Learn the basics Quiz 34  (0) 2019.05.12
Python Learn the basics Quiz 33  (0) 2019.05.12
Python Learn the basics Quiz 31  (0) 2019.05.02
Python Learn the basics Quiz 30  (0) 2019.05.02
Python Learn the basics Quiz 29  (0) 2019.04.30