Apparently I've made a lot of mistakes, I'm pretty new to Python so that's why.
I have a random.randint
within an if
statement and another one within an elif
statement. But the 1st one comes up even when I put my input to an answer that's supposed to take me to the second one (E.g. prank
).
This is my code:
import random
LOL = raw_input('Do you want a meme or a prank idea? ')
if LOL == 'meme' or 'Meme' or 'MEME':
x = random.randint(1, 5)
if x == 1:
print('Yee')
elif x == 2:
print('Yeet!')
elif x == 3:
print('I got the horses in the back')
elif x == 4:
print('AND HIS NAME IS JOHN CENA!!!!')
elif x == 5:
print('IT\'S OVER 9000!')
elif LOL == 'prank' or 'Prank' or 'PRANK':
y = random.randint(1, 3)
if y == 1:
print('Replace their Oreo frosting with toothpaste.')
elif y == 2:
print('Blast into their room with an air horn.')
elif y == 3:
print('Blast the FBI meme on a loud speaker on max volume')
It shows the one of the memes even when I write "prank" and I think it's because the random.randint
goes anyways and since it's first, it goes first and overlaps the second random.randint
.