Teacherbot
05 Apr, 11:02:19
def inputInt(prompt): while True: response = input(prompt) try: numResponse = int(response) return numResponse except ValueError: print(“Invalid input”)
Loading...
Sign up for a free account to try! It takes less than 20 seconds
def inputInt(prompt): while True: response = input(prompt) try: numResponse = int(response) return numResponse except ValueError: print(“Invalid input”)
Loading...