Question: I am attempting to implement a level of input validation utilizing a regular expression. This would be for the variable select. I would like to
I am attempting to implement a level of input validation utilizing a regular expression. This would be for the variable "select". I would like to validate that only a number was entered / selected.
def display_menu(Class_Roster): """ """ print("") print("Please choose an option below:") print("") print("1. Record a time") print("2. Print all times") print("3. Calculate average") print("4. Exit program") print("_________________________________________") while True: select= input("Enter your choice: ") try: main() except SystemExit: print("Exiting...")
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
