-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex045.py
More file actions
47 lines (43 loc) · 1.05 KB
/
ex045.py
File metadata and controls
47 lines (43 loc) · 1.05 KB
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
from random import randint
from time import sleep
jokenpo = ['Rock', 'Paper', 'Scissors']
computer = randint(0, 2)
print('--=' * 10)
print(' Lets Play Jokenpo')
print('--=' * 10)
print('''[ 1 ] Rock
[ 2 ] Paper
[ 3 ] Scissors''')
player = int(input('Your Move:'))
print('JOO')
sleep(0.5)
print('KEEN')
sleep(0.5)
print('PO!!!')
print('--=' * 10)
print('Your Choice: {}'.format(jokenpo[player - 1]))
print('Computer Choice: {}'.format(jokenpo[computer]))
print('--=' * 10)
if player == 1:
if computer == 0:
print('\033DRAWN!')
elif computer == 1:
print('Computer WON!')
elif computer == 2:
print('You WON!')
elif player == 2:
if computer == 1:
print('DRAWN!')
elif computer == 2:
print('Computer WON!')
elif computer == 0:
print('You WON!')
elif player == 3:
if computer == 2:
print('DRAWN!')
elif computer == 0:
print('Computer WON!')
elif computer == 1:
print('You WON!')
else:
print('INVALID OPTION')