-
Notifications
You must be signed in to change notification settings - Fork 0
/
RPS_FLW.txt
99 lines (53 loc) · 1.54 KB
/
RPS_FLW.txt
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/bin/python3
from random import randint
player = input('rock(r), paper(p) or scissors(s)?')
print(player,'vs', end=' ')
chosen = randint(1,3)
#print(chosen)
if chosen == 1:
computer = 'r'
elif chosen == 2:
computer = 'p'
else:
computer = 's'
print (computer)
if player == computer:
print('Draw!')
elif player == 'r' and computer == 'p':
print('Computer Wins!!')
elif player == 'r' and computer == 's':
print('Player Wins!!')
elif player == 'p' and computer == 's':
print('Computer Wins')
elif player == 'p' and computer == 'r':
print('Player Wins!!')
elif player == 's' and computer == 'r':
print('Computer Wins!!')
elif player == 's' and computer == 'p':
print('Player Wins!!')
from random import randint
player = input('fire(f), logs(l) or water(w)?')
print(player,'vs', end=' ')
chosen = randint(1,3)
#print(chosen)
if chosen == 1:
computer = 'f'
elif chosen == 2:
computer = 'l'
else:
computer = 'w'
print (computer)
if player == computer:
print('Draw!')
elif player == 'f' and computer == 'l':
print('Player Wins!!')
elif player == 'f' and computer == 'w':
print('Computer Wins!!')
elif player == 'l' and computer == 'w':
print('Player Wins')
elif player == 'l' and computer == 'f':
print('Computer Wins!!')
elif player == 'w' and computer == 'l':
print('Computer Wins!!')
elif player == 'w' and computer == 'f':
print('Player Wins!!')