Code:
import time
while True:
value = int(input("Anti-Bot Test: Enter a number under 5 (leave blank to quit): "))
if not value:
break
elif value < 5:
print ("Passed")
break
else:
print ("Failed")
if value:
username = input("Enter Username: ")
password = input("Enter Password: ")
password2 = input("Re-enter Password: ")
while (password != password2):
print ("Second password doesn't match the first password")
print ("Re-enter your original password")
password2 = input("")
dob = input("Date of Birth: ")
print ("Review the following information")
time.sleep(1)
print ("You would like your username to be: %s" % (username))
print ("Your date of birth is: %s" % (dob))
y=['yes']
yn=str(input("Type yes to confirm information or no to revise it: "))
if yn in y:
print ("Thank you for registering")
I need it if they type no they go back to entering their username. Also if they type anything else except 'yes' or 'no' it tells them that is wrong and to type 'yes or 'no' again.
Thanks for the help so far guys