lundi 29 juillet 2019

How do I combine 2 random randints? [on hold]

I'm making a Python script and random.randints are a major part of it. But I want to add another part of my code where it combines both of my random.randint values. How do I do it?

I was going to do some sort of append but I don't know how to make that work.

Here's my code without any code trying to combine the random.randint values:

import random
LOL = raw_input('Do you want a meme or a prank idea? ')
if LOL == 'meme' or LOL == 'Meme' or LOL == 'MEME':
  x = random.randint(1, 6)
 if x == 1:
   print('Meme:')
   print('Yee')
 elif x == 2:
   print('Meme:')
   print('Yeet!')
 elif x == 3:
   print('Meme:')
   print('I got the horses in the back')
 elif x == 4:
   print('Meme:')
   print('AND HIS NAME IS JOHN CENA!!!!')
 elif x == 5:
   print('Meme:')
   print('IT\'S OVER 9000!')
 elif x == 6:
   print('Meme:')
   print('Do u no de wae?')
elif LOL == 'prank' or LOL == 'Prank' or LOL == 'PRANK' or LOL == 'prank               Idea' or LOL == 'Prank idea' or LOL == 'Prank Idea' or LOL == 'PRANK IDEA':
 y = random.randint(1, 5)
 if y == 1:
   print('''Prank:
   Replace their Oreo frosting with toothpaste, make sure they don\'t eat it!''')
elif y == 2:
  print('''Prank:
  Blast into their room with an air horn, but it won\'t work if they\'re deaf!''')
elif y == 3:
  print('''Prank:
  Blast the FBI meme on max volume with a loud speaker, hopefully they don\'t have sensitive ears!''')
elif y == 4:
  print('''Prank:
  Dump a bucket of cold/icy water on their head, if the weathers freezing then that\'s too cruel!''')
elif y == 5:
  print('''Prank:
  Cover their car with sticky notes, make sure it\'s a non-windy environment!''')




Aucun commentaire:

Enregistrer un commentaire