![]() I am trying to output the correct 3 times based on the input of EST,am/pm to Central Time (CT), Mountain Time(MT), and Pacific Time(PT) all in the correct am/pm. I get this output: 7 am EST is 6 Central Time(CT) Print(time, time_day, eEst, time-3, pPacific) Print(time, time_day, eEst, time-2, mMountain) Print(time, time_day, eEst, time-1, cCentral) Print('Input is not in the right format') #this is where input is not in the right format PPacific = 'Pacific Time(PT)'#-3 hours offset MMountain = 'Mountain Time(MT)'#-2 hours offset This function converts a 12-hour time, represented by am/pm,to its equivalent 24-hour time.ĬCentral = 'Central Time(CT)' #-1 hour offset Central Time (CT), Mountain Time(MT), and Pacific Time(PT) all in the correct am/pm): def time_in_24h(time,time_day): #time is eastern time In Python, using this function (takes Eastern Standard Time (EST) with am/pm, should output it in 3 time formats.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |