current_time_str = input("What is the current time? ") waiting_time_str = input("How many hours do you have to wait? ") current_time_int = int(current_time_str) waiting_time_int = int(waiting_time_str) hours = current_time_int + waiting_time_int timeofday = hours % 24 print(timeofday)This works. However, I am unsure on what to do with the "am" and "pm".
how to think like a computer scientist
Messages In This Thread |
how to think like a computer scientist - by broke_university_student - Jan-05-2018, 04:58 AM
RE: how to think like a computer scientist - by Mekire - Jan-05-2018, 05:18 AM
RE: how to think like a computer scientist - by broke_university_student - Jan-05-2018, 06:39 AM
RE: how to think like a computer scientist - by Antonioney - Dec-03-2020, 08:19 AM
RE: how to think like a computer scientist - by Larz60+ - Jan-05-2018, 01:05 PM
RE: how to think like a computer scientist - by jajjaja - Jan-05-2018, 08:54 PM
RE: how to think like a computer scientist - by Larz60+ - Jan-05-2018, 09:38 PM
|
Users browsing this thread: 1 Guest(s)