Question: I am trying to write a program in python 3 that checks the validity of a user input of time. The code runs perfectly when
#A program for checking the validity of a time entered by the user as a set of three integers #Tineo Galela #4 March 2018 hours-input( Enter the hours: ") minutes-input( Enter the minutes: ") seconds-input("Enter the seconds : ") a-eval (hours) b-eval(minutes) c-eval(seconds) f a 24: f b 60: if c0 or c60: print("Your time is invalid") else: print("Your time is valid.")
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
