Question: Problem 1 Write Python a code sequence that does the following: Asks you what is the current time; hours, minutes and seconds and print out

Problem 1

Write Python a code sequence that does the following:

  1. Asks you what is the current time; hours, minutes and seconds and print out the time in 24 Hours format.
  2. Checks if the current time is passed 12:59pm and displays the time in 12 Hours format (example: 13:43 will be displayed as 1:43 pm). (Hint: you will have to find a way to convert from 24h format to 12 h format as you can only enter the time once at the beginning of the program)
  3. Calculates and displays the total time in seconds "i.e., How many seconds passed since the start of the day?" (Hint: think about operators precedence)

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 Databases Questions!