-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRock_Paper_Scissors.py
More file actions
48 lines (40 loc) · 835 Bytes
/
Rock_Paper_Scissors.py
File metadata and controls
48 lines (40 loc) · 835 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
36
37
38
39
40
41
42
43
44
45
46
import random
rock = '''
_______
---' ____)
(_____)
(_____)
(____)
---.__(___)
'''
paper = '''
_______
---' ____)____
______)
_______)
_______)
---.__________)
'''
scissors = '''
_______
---' ____)____
______)
__________)
(____)
---.__(___)
'''
game_images = [rock, paper, scissors]
print("Welcome to game Rock, Paper or Scissor")
print("What do you choose? Type 0 for Rock, 1 for Paper or 2 for Scissors.")
player = int(input())
print("Player")
print(game_images[player])
computer = random.randint(0,2)
print("Computer")
print(game_images[computer])
row1 = ["Draw","You lose","You win"]
row2 = ["You win","Draw","You lose"]
row3 = ["You lose","You win","Draw"]
map = [row1, row2, row3]
resultado = map [player][computer]
print(resultado)