0
How do i ask for specific input from a user, using a for loop, to reject all wrong input and re - request for input?
3 Answers
+ 1
For example:
zero=input("Please enter a zero.\n")
while float(zero) != 0:
zero=input("I said a zero.\n")
print(zero)
EDIT:
If you are not using python you can use a do/while loop for better readability.
0
Thank you very much :-)
0
No problem :)