태지쌤

로봇 & 코딩교육 No.1 크리에이터

파이썬/exercise

2-2 python 남은 삶 계산

태지쌤 2022. 12. 27. 04:03
반응형
age = input("What is your current age?")
age_int = int(age)
remain_age = 90 - age_int
days = remain_age * 365
weeks = remain_age * 52
months = remain_age * 12

print(f"You have {days} days, {weeks} weeks, and {months} months left.")
반응형

'파이썬 > exercise' 카테고리의 다른 글

3-2 python Pizza calculator  (0) 2022.12.27
2-3 python tip calculator  (0) 2022.12.27
2-1/3-1 python BMI calculator  (0) 2022.12.27
1-2 python variables  (0) 2022.12.27
1-1 Python Print/input Function  (0) 2022.11.30