Feb-14-2020, 05:00 AM
try: # def entr(n = int(input("Enter a no: "))): Ask = int(input("Enter a no: ")) t = (2,3,4) if Ask in t: print("Valid No") else: print("Not valid") print("Enter Again:") raise ValueError # Ask = int(input("Enter a no: ")) except Exception as e: print("The no is not in Tuple",e,Ask)I am successful in checking whether the no entered is in the tuple. If not it raise exception. Up to that point OK.
Now I want to prompt the user to enter another no. How do I run line 6 and ask the user to enter again.
Thanks