Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
name = input("Enter your name: ")
print(f"Hello, {name}.")
age = int(input("How old are you? "))
months = age * 12
days = months * 30
hours = days * 24
minutes = hours * 60
seconds = hours * 60
# we can calculate seconds with a chain of multiplys: age * 12 * 30 * 24 * 60 * 60
print(f"You are {months} months, {days} days, {hours} hours and {minutes} minutes and {seconds} seconds old.")