-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgame'.py
More file actions
30 lines (30 loc) · 874 Bytes
/
Copy pathgame'.py
File metadata and controls
30 lines (30 loc) · 874 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
x='play'
y='quit'
z=str(input('input your choice '))
while z==x:
a=['rock','paper','scissors']
b=str(input('enter your choice '))
import random
c=random.choice()
print('your choice=',b)
print('computer choice=',c)
if b=='rock' and c=='paper':
print('you lost')
elif b=='paper' and c=='scissors':
print('you lost')
elif b=='scissors' and c=='paper':
print('you won')
elif b=='rock' and c=='scissors':
print('you won')
elif b=='paper' and c=='rock':
print('you won')
elif b=='scissors' and c=='rock':
print('you lost')
elif b=='paper' and c=='paper':
print('draw')
elif b=='scissors' and c=='scissors':
print('draw')
elif b=='rock' and c=='rock':
print('draw')
print('PRESS P To PLAY AGAIN ')
z=str(input())