Question: Modify the program below to demonstrate the following: 1. User enters total number of hours and minutes elapsed 2. Display the total time elapsed in

 Modify the program below to demonstrate the following: 1. User enters

Modify the program below to demonstrate the following: 1. User enters total number of hours and minutes elapsed 2. Display the total time elapsed in number of seconds [ ] # Activity 1.7 # Get a number of seconds from the user. total_seconds = float (input('Enter a number of seconds: ') ) # Get the number of hours. hours = total_seconds // 3600 # Get the number of remaining minutes. minutes = (total_seconds // 60) % 60 # Get the number of remaining seconds. seconds = total_seconds % 60 # Display the results. print ('Here is the time in hours, minutes, and seconds: " ) print ( ' Hours: ', hours) print ( 'Minutes: ', minutes) print( 'Seconds: ', seconds)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!