-
Notifications
You must be signed in to change notification settings - Fork 8
/
stone,paper,scissor.py
42 lines (38 loc) · 1.1 KB
/
stone,paper,scissor.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
32
33
34
35
36
37
38
39
40
41
42
from sys import argv
from math import *
import pylance
import sql
from random import randint
t = ["rock", "paper", "scissor"]
computer = t[randint(0,2)]
player = False
while player == False:
player = input("rock, paper, scissor?")
if player == computer:
print("Tie!")
print ("Computer do", computer)
elif player == "rock":
if computer == "paper":
print("You lose!")
print ("Computer do", computer)
else:
print("You win!")
print ("Computer do", computer)
elif player == "paper":
if computer == "scissor":
print("You lose!")
print ("Computer do", computer)
else:
print("You win!")
print ("Computer do", computer)
elif player == "scissor":
if computer == "rock":
print("You lose...")
print ("Computer do", computer)
else:
print("You win!")
print ("Computer do", computer)
else:
print("That's not a valid play. Check your spelling!")
player = False
computer = t[randint(0,2)]