[Type C] Python Revision Tour-1 – Chapter 1

|
Table of Contents

3. Write a Python program that calculates and prints the number of seconds in a year.

seconds_in_minute = 60
minutes_in_hour = 60
hours_in_day = 24
days_in_year = 365

seconds_in_year = seconds_in_minute * minutes_in_hour * hours_in_day * days_in_year
print("Number of seconds in a year:", seconds_in_year)
Output
Number of seconds in a year: 31536000
"Spread the light within, illuminate the hearts around you. Sharing is not just an action, but a sacred journey of connecting souls."~ Anonymous

Leave a Reply

Your email address will not be published. Required fields are marked *