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

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!