Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- import sys
- import os
- import time
- clear = lambda: os.system('cls')
- x = 0
- y = 0
- clear()
- uChoice = raw_input("Rock, Paper, or Scissors?")
- clear()
- poss = ["Rock...", "Paper...", "Scissors..."]
- while x < 3:
- print(poss[y])
- time.sleep(2)
- x = x + 1
- y = y + 1
- time.sleep(2)
- print("SHOOT!")
- time.sleep(0.2)
- sChoice = random.randrange(1,4)
- if sChoice == 1:
- sChoicet = "Rock"
- elif sChoice == 2:
- sChoicet = "Paper"
- elif sChoice == 3:
- sChoicet = "Scissors"
- if uChoice == "Rock" and sChoice == 1 or uChoice == "Paper" and sChoice == 2 or uChoice == "Scissors" and sChoice == "3":
- print("The opponent chose %s" %(sChoicet))
- print("The match was a draw.")
- elif uChoice == "Rock" and sChoice == 2 or uChoice == "Paper" and sChoice == 3 or uChoice == "Scissors" and sChoice == "1":
- print("The opponent chose %s" %(sChoicet))
- print("You lost the match, unlucky.")
- elif uChoice == "Rock" and sChoice == 3 or uChoice == "Paper" and sChoice == 1 or uChoice == "Scissors" and sChoice == "2":
- print("The opponent chose %s" %(sChoicet))
- print("You won the match!")
Add Comment
Please, Sign In to add comment