seconds = 1e9 minutes = seconds / 60 hours = minutes /60 days = hours / 24 years = days/365.25 #Note that "f-string" formatting is used for nice output #see page 11 of the book: print(f'One billion seconds is {years:.2f} years') """ Terminal> python seconds2years.py One billion seconds is 31.69 years """