-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrock_paper.py
More file actions
51 lines (47 loc) · 967 Bytes
/
rock_paper.py
File metadata and controls
51 lines (47 loc) · 967 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
47
48
49
50
51
import random
print('welcome come to game ')
rock ="""
_______
---' ____)
(_____)
(_____)
(____)
---.__(___)
"""
# Paper
paper="""
_______
---' ____)____
______)
_______)
_______)
---.__________)
"""
# Scissor
scissor ="""
_______
---' ____)____
______)
__________)
(____)
---.__(___)
"""
list = [paper,scissor,rock]
game = int(input('what do you choose ? type 0 for rock 1 for paper and 2 scissor:'))
if game ==0:
print(rock)
elif game ==1:
print(paper)
elif game ==2:
print(scissor)
print('computer choose')
computer_choose=(random.choice(list))
print(computer_choose)
if computer_choose== game:
print('tie')
elif (computer_choose == paper and game==2 or
computer_choose == rock and game == 1 or
computer_choose == scissor and game == 0):
print('you win')
else:
print('you loose')