#---------------------------------------------------------------------- # Name: Shreshth Input Validation # Purpose: Checking input Validity # # Author: Ron-Dogg # # Created: 11/03/2025 # Copyright: (c) ruz 2019 # Licence: I will take a licence next week! #---------------------------------------------------------------------- # Checking for name validation. Will only accept names with no numbers or spaces while True: name = str(input("What is your name? ")) if name.isalpha() == True: break else: print("That is not an acceptable nae please try again") # Checking for integer input validation. while True: try: round = int(input("How many rounds do you want to play? 1-5")) if round < 1 or round > 5: #If the user inputs a number above 5 or below 0, it asks again print("Please choose a number between 1 and 5") else: break except: #If the user doesn't input a number at all, it asks again print("You didn't even put in a number how am I supposed to process that you bro?")