Created
April 9, 2017 20:47
-
-
Save mikleg/b6124b06d4f5f4abe48992bea5056af2 to your computer and use it in GitHub Desktop.
Alarm set calculator. using a 24 hour clock (11 is 11am and 23 is 11pm, 0 is midnight). If it is currently 13 and you set your alarm to go off in 50 hours, it will be 15 (3pm). A Python program to solve the general version of the above problem.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
time_now=float(input("please enter time now")) | |
alarm_set=float(input("please enter the number of hours to wait for the alar")) | |
print("the time will be:", (time_now+alarm_set)%24) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment