repl.it
Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
pA = 'y'
import random
op = ('Rock', 'paper', 'scissors', 'lizard', 'Spock?')
print("Hello welcome to Rock, paper, scissors, lizard, Spock")
while pA == 'y':
  c = random.choice(op)
  p = input("Rock, paper, scissors, lizard, Spock?\n").strip().lower()
  if c == p:
    print("you tied with me go one more time")
    print("You win!")
  elif c == 'Rock' or p == 'Rock' and c == 'scissors' or p == 'scissors' or p ==   'lizard' or c == 'lizard':
    print("You win")
  elif c == 'scissors' or p == 'scissors' and c == 'paper' or p == 'paper' or p == 'lizard'   or c == 'lizard':
   print("You win!")
  elif c == 'paper' or p == 'paper' and c == 'Rock' or p == 'Rock' or p == 'Spock' or c == 'Spock':
   print("You win!")
  elif c == 'lizard' or p == 'lizard' and c == 'paper' or p == 'paper' or p == 'Spock' or c == 'Spock':
   print("You win!")
  elif c == 'Spock' or p == 'Spock' and c == 'scissors' or p == 'scissors' or p == 'Rock' or c == 'Rock':
   print("You win!")
  else:
   print("You lose")
  pA = input("Do you want to play again? y/n \n")
  if pA == 'y':
   print("Answer again please/n")
  if pA == 'n':
   print("Play again sometime in the future")
   break