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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started