-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDay-4
64 lines (56 loc) · 1.17 KB
/
Day-4
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
import random
user_input = int(input("What do you choose? 0 for rock , 1 for paper , 2 for scissors\n"))
rock = '''
_______
---' ____)
(_____)
(_____)
(____)
---.__(___)
'''
paper = '''
_______
---' ____)____
______)
_______)
_______)
---.__________)
'''
scissors = '''
_______
---' ____)____
______)
__________)
(____)
---.__(___)
'''
if user_input == 0:
print("you chooses rock")
print(rock)
elif user_input == 1:
print("you chooses paper")
print(paper)
elif user_input == 2:
print("you chooses scissors")
print(scissors)
# computer chance to play
random_output = random.randint(0,2)
print("computer choice")
if random_output == 0:
print("rock")
print(rock)
elif random_output == 1:
print("paper")
print(paper)
elif random_output == 2:
print("scissors")
print(scissors)
# checking for the winner
if random_output == user_input :
print("MATCH TIE")
elif random_output == 0 and user_input == 2 or random_output == 1 and user_input == 0 :
print("YOU LOOSE!!")
print("Computer wins.")
else :
print("YOU WINS!!")
print("Computer loose")