-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathv3.py
More file actions
35 lines (32 loc) · 720 Bytes
/
v3.py
File metadata and controls
35 lines (32 loc) · 720 Bytes
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
from random import randint
# print("Rock...")
# print("Paper...")
# print("Scissors...")
player = input("Player, make your move: ").lower()
rand_num = randint(0,2)
if rand_num == 0:
computer = "rock"
elif rand_num == 1:
computer = "paper"
else:
computer = "scissors"
print(f"Computer plays {computer}" )
if player == computer:
print("It's a tie!")
elif player == "rock":
if computer == "scissors":
print("player wins!")
else:
print("computer wins!")
elif player == "paper":
if computer == "rock":
print("player wins!")
else:
print("computer wins!")
elif player == "scissors":
if computer == "paper":
print("player wins!")
else:
print("computer wins!")
else:
print("Please enter a valid move!")