Mar-23-2021, 02:51 PM
You are going to need two nested loops if you want it to stay on 'A' until a valid entry is made and then go on to 'B'.
event = ["A","B","C","D"] for x in range(4): maximum = 0 while maximum < 5 or maximum > 50 : maximum=(int(input("Enter the maximum points for the " + event[x] + " event "))) if maximum<5 or maximum>50: print("The score should be between 5 and 50") else: print("The maximum points for the " + event[x] + " event is " ,maximum) print("\n----------------------------------------------")