Guest User

Untitled

a guest
Dec 13th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. import random
  2. import sys
  3. import os
  4. import time
  5.  
  6. clear = lambda: os.system('cls')
  7.  
  8. x = 0
  9. y = 0
  10.  
  11. clear()
  12.  
  13. uChoice = raw_input("Rock, Paper, or Scissors?")
  14.  
  15. clear()
  16.  
  17. poss = ["Rock...", "Paper...", "Scissors..."]
  18.  
  19. while x < 3:
  20. print(poss[y])
  21. time.sleep(2)
  22. x = x + 1
  23. y = y + 1
  24.  
  25. time.sleep(2)
  26.  
  27. print("SHOOT!")
  28. time.sleep(0.2)
  29.  
  30. sChoice = random.randrange(1,4)
  31.  
  32. if sChoice == 1:
  33. sChoicet = "Rock"
  34. elif sChoice == 2:
  35. sChoicet = "Paper"
  36. elif sChoice == 3:
  37. sChoicet = "Scissors"
  38.  
  39. if uChoice == "Rock" and sChoice == 1 or uChoice == "Paper" and sChoice == 2 or uChoice == "Scissors" and sChoice == "3":
  40. print("The opponent chose %s" %(sChoicet))
  41. print("The match was a draw.")
  42. elif uChoice == "Rock" and sChoice == 2 or uChoice == "Paper" and sChoice == 3 or uChoice == "Scissors" and sChoice == "1":
  43. print("The opponent chose %s" %(sChoicet))
  44. print("You lost the match, unlucky.")
  45. elif uChoice == "Rock" and sChoice == 3 or uChoice == "Paper" and sChoice == 1 or uChoice == "Scissors" and sChoice == "2":
  46. print("The opponent chose %s" %(sChoicet))
  47. print("You won the match!")
Add Comment
Please, Sign In to add comment