The scenerio is: I’m asking user to input only 5 numbers between 1 and 5 but how do we fix if he input 6 or more and 1 or less and also how to repeat the program again and again if he inputted negative integers like -1,-2. Also, if he input strings, I want to show the users to input only integers
Num = [0,0,0,0,0]
for i in range (5):
Num[i] = int(input("Put the numbers only between 1 and 5!”))
print("Your numbers are ", Num)
I tried try except value error but I’m not sure how to put it and expected program to run without errors