I am trying to make it so when you put in something that is not a normal letter for your name it asks you to try again, but the while loop is not recognising it. It just keeps doing the while loop no matter what. I think it might have something to do with the variable is made insde a define.
Here is my code:
from cgi import test
from re import T
import time
import math
big_nono_numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9,]
big_nonosymbols = ["!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "-", "", "=", "+", ":", ";", "{", "}", "[", "]", "'", ">", "<", "/", "?"]
yesyesyesses = ['yes', 'y', 'ye', 'ys', 'k', 'ok', 'sure', 'alright', 'okay']
nononoes = ['no', 'n', 'nah', 'na', 'never', 'i dont', 'not really', 'im good',]
v1 = False
v2 = False
v3 = True
def space():
print('')
def validate1():
if i2.find('`') >=0:
v2 = False
elif i2.find('~') >=0:
v2 = False
elif i2.find('!') >=0:
v2 = False
elif i2.find('@') >=0:
v2 = False
elif i2.find('#') >=0:
v2 = False
elif i2.find('$') >=0:
v2 = False
elif i2.find('%') >=0:
v2 = False
elif i2.find('^') >=0:
v2 = False
elif i2.find('&') >=0:
v2 = False
elif i2.find('*') >=0:
v2 = False
elif i2.find('(') >=0:
v2 = False
elif i2.find(')') >=0:
v2 = False
elif i2.find('-') >=0:
v2 = False
elif i2.find('=') >=0:
v2 = False
elif i2.find('_') >=0:
v2 = False
elif i2.find('+') >=0:
v2 = False
elif i2.find('[') >=0:
v2 = False
elif i2.find('{') >=0:
v2 = False
elif i2.find(']') >=0:
v2 = False
elif i2.find('}') >=0:
v2 = False
elif i2.find('|') >=0:
v2 = False
elif i2.find(';') >=0:
v2 = False
elif i2.find(':') >=0:
v2 = False
elif i2.find("'") >=0:
v2 = False
elif i2.find('"') >=0:
v2 = False
elif i2.find(',') >=0:
v2 = False
elif i2.find('<') >=0:
v2 = False
elif i2.find('.') >=0:
v2 = False
elif i2.find('>') >=0:
v2 = False
elif i2.find('/') >=0:
v2 = False
elif i2.find('?') >=0:
v2 = False
elif i2.find('0') >=0:
v2 = False
elif i2.find('1') >=0:
v2 = False
elif i2.find('2') >=0:
v2 = False
elif i2.find('3') >=0:
v2 = False
elif i2.find('4') >=0:
v2 = False
elif i2.find('5') >=0:
v2 = False
elif i2.find('6') >=0:
v2 = False
elif i2.find('7') >=0:
v2 = False
elif i2.find('8') >=0:
v2 = False
elif i2.find('9') >=0:
v2 = False
else:
v2 = True
print(v2)
def test():
print(1)
chatbot_run = True
space
print('Welcome to Astronaugt-for-hire!')
time.sleep(1)
i1 = input('Do you want to hire an astronaught? ')
if i1 in yesyesyesses:
v1 = True
space
time.sleep(3)
print("That's Great! First you will have to create an account.")
elif i1 in nononoes:
v1 = True
time.sleep(2)
print('WELL TOO BAD! YOU ARE ANYWAY. Time to make an account.')
while v1 == False:
i1 = input('Could you say that again? ')
if i1 in yesyesyesses:
v1 = True
time.sleep(3)
print("That's Great! First you will have to create an account.")
elif i1 in nononoes:
v1 = True
time.sleep(1)
print('WELL TOO BAD! YOU ARE ANYWAY. Time to make an account.')
time.sleep(1)
print('Lets start.')
time.sleep(1.5)
i2 = input('Step 1. What is your name? ')
validate1()
test()
while v2 == False:
i2 = input('please try again')
validate1()
this is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me postthis is so it lets me post