I have a problem with the python 2.7 code I made and can't seem to find any answers from friends so I came here. I am a complete noob at python and programming in general. Here is the code:
import time
import random
a = ['Spooky','Sexy','Snazzy','Random','Wild','Smoggy','Enchanting','Quick','Acoustic','Irritating','Annoying','Thirsty','Fierce','Embarassed','Touch']
b = ['Kurtis','Tisa','Randy','Theda','Dani','Beulah','Dallas','Jeannette','Vera','Kristopher','Donna','Wanda','Sergio','Betsy','Holly']
c = ['1873','123','448','8781','1284','3','45','34']
d = ['Hicks','Ryan','Houston','Cunningham','Ortiz','Baker','Erickson','Pittman','Patrick','Blake','Allison','Taylor','Harper','Romero']
random.shuffle(a)
random.shuffle(b)
random.shuffle(c)
random.shuffle(d)
a = raw_input('Would you like a random username? ')
if a == 'Yes' or 'yes' or 'Yea' or 'yea':
print 'PROCESSING..'
time.sleep(.5)
print 'PROCESSING..'
time.sleep(.5)
print 'PROCESSING..'
time.sleep(.5)
print 'PROCESSING..'
time.sleep(.5)
print 'PROCESSING..'
time.sleep(.5)
print 'PROCESSING..'
time.sleep(.5)
print 'PROCESSING..'
time.sleep(.5)
print 'PROCESSING..'
time.sleep(.5)
print a[3] + b[2] + d[5] + c[4]
else:
print "I didn't have a name for you anyways"
My problem is that the program generates a random name even if you enter something other then the 'Yes' or 'yes' or 'Yea' or 'yea'. Thanks so much in advance!
orworks in Python. It's a duplicate question but I don't know what to search for.