Please Answer All Questions And Be Sure To Include Comments In Your Code. You Look At The Clock And It Is Exactly 2pm.

Please answer all questions and be sure to include comments in your code.

 

  1. You look at the clock and it is exactly 2pm. You set an alarm to go off in 51 hours. At what time does the alarm go off? (Hint: you could count on your fingers, but this is not what we’re after. If you are tempted to count on your fingers, change the 51 to 5100.) Write a Python program to solve the general version of the above problem. Ask the user for the time now (in hours), and ask for the number of hours to wait. Your program should output what the time will be on the clock when the alarm goes off.

Expert's Answer

t=int(input("Enter time now>>")) #Hear we ask the user to enter the present time print("1. for am\n2. for pm") am=int(input("select the option>>")) # Heare we ask to select am  or pm  timer=int(input("Enter no of  hours to set alarm>>")) # Here we as…

Hire Expert Tutors

Get Professional Tutoring at Low Price in Australia


Professional

Tutoring Services

25,187+

Orders Delivered

4.9/5

5 Star Rating

621

PhD Experts

 

Amazing Features

Plagiarism Free

Top Quality

Best Price

On-Time Delivery

100% Money Back

24 x 7 Support

TOP