Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. import random
  2. import time
  3.  
  4. list = ["Rock","Paper","Scissors"]
  5.  
  6. pInput = input("Rock, Paper, or Scissors? (1/2/3):")
  7.  
  8. if pInput == "1":
  9. pInput = 1
  10.  
  11. if pInput == "2":
  12. pInput = 2
  13.  
  14. if pInput == "3":
  15. pInput = 3
  16.  
  17. print("Rock...")
  18.  
  19. time.sleep(1)
  20.  
  21. print("Paper...")
  22.  
  23. time.sleep(1)
  24.  
  25. print("Scissors...")
  26.  
  27. time.sleep(1)
  28.  
  29. print("Shoot!")
  30.  
  31. time.sleep(1)
  32.  
  33. cInput = random.choice(list)
  34.  
  35. if cInput == "Rock":
  36. cInput = 1
  37.  
  38. if cInput == "Paper":
  39. cInput = 2
  40.  
  41. if cInput == "Scissors":
  42. cInput = 3
  43.  
  44. if cInput == 1:
  45. print("THE COMPUTER CHOSE ROCK")
  46.  
  47. if cInput == 2:
  48. print("THE COMPUTER CHOSE PAPER")
  49.  
  50. if cInput == 3:
  51. print("THE COMPUTER CHOSE SCISSORS")
  52.  
  53. time.sleep(2)
  54.  
  55. if pInput == 1:
  56. print("YOU CHOSE ROCK")
  57.  
  58. if pInput == 2:
  59. print("YOU CHOSE PAPER")
  60.  
  61. if pInput == 3:
  62. print("YOU CHOSE SCISSORS")
  63.  
  64. time.sleep(2)
  65.  
  66. if pInput == 1:
  67. if cInput == 1:
  68. print("YOU DREW!")
  69. if cInput == 2:
  70. print("YOU LOST!")
  71. if cInput == 3:
  72. print("YOU WON!")
  73.  
  74. if pInput == 2:
  75. if cInput == 1:
  76. print("YOU WON!")
  77. if cInput == 2:
  78. print("YOU DREW!")
  79. if cInput == 3:
  80. print("YOU LOST!")
  81.  
  82. if pInput == 3:
  83. if cInput == 1:
  84. print("YOU LOST!")
  85. if cInput == 2:
  86. print("YOU WON!")
  87. if cInput == 3:
  88. print("YOU DREW!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement