A normal year consists of 365 days, each day has 24 hours and each hour comprises of 60 minutes. There are 60 seconds in an hour. By multiplying all these values, we get the total seconds in a year.
Program code:
Clear Doubts with Computer TutorIn case you’re facing problems in understanding concepts, writing programs, solving questions, want to learn fun facts | tips | tricks or absolutely anything around computer science, feel free to join CTs learner-teacher community: students.computertutor.in
Output:
Number of seconds in a year are: 31536000
In the above program, variables days,hours,minutes,seconds are declared and assigned to their appropriate values.
When all the values are multiplied, we get the desired answer.
Basic python functionality is demonstrated in above program.
To view all the lessons in chapter 1: http://computertutor.in/class-12-computer-science/chapter-1/
To view entire class 12 computer science study material: http://computertutor.in/resources/
You cannot copy content of this page