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

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 the user inputs positive numbers but does not execute when the user inserts a negative number, what should I do? What could be the problem?
 I am trying to write a program in python 3 that

#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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!