-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCore Code
41 lines (37 loc) · 1.71 KB
/
Core Code
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
32
33
34
35
36
37
38
39
40
41
# Rock, Paper, Scissors the Game, The Movie. Written with Python.
from random import randint
#Create list of play options
t = ["Rock", "Paper", "Scissors"]
#assign a random play to the computer
computer = t[randint(0,2)]
#set player to False
player = False
while player == False:
#set player to true
player = input("Rock, Paper, Scissors?")
if player == computer:
print("Tie!")
#If the player chooses Rock
elif player == "Rock":
if computer == "Paper":
print("You lose!", computer, "covers in an unfathomably large piece of milled wood", player)
else:
print("You win!", player, "smashes you're computer into atoms so small you can't hope to ever recover your minecraft save", computer)
#If the player chooses Paper
elif player == "Paper":
if computer == "Scissors":
print("You lose!", computer, "cuts you to bits so elegantly that you might think this is a simulation", player)
else:
print("You win!", player, "cuts your hand clean in half to the dismay of the ", computer)
#If the player chooses Scissors
elif player == "Scissors":
if computer == "Rock":
print("You lose!", computer, "smashes your hand into a million bits. This keeps you from coding garbage ever again. Thank god.", player)
else:
print("You win!", player, "SNIP SNIP I WANNA CUT IT OFF! SNNNNAAAARF!", computer)
#If the player chooses Snuffaluffagus
else:
print("That's not a valid play. Check your spelling and put the gun away!")
#player was set to True, but we want it to be false so the loop continues
player = False
computer = t[randint(0,2)]