-
Notifications
You must be signed in to change notification settings - Fork 0
/
rock_paper_scissor.py
49 lines (46 loc) · 1.13 KB
/
rock_paper_scissor.py
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
import random
rock = """
_______
---' ____)
(_____)
(_____)
(____)
---.__(___)
"""
paper = """
_______
---' ____)____
______)
_______)
_______)
---.__________)
"""
scissors = """
_______
---' ____)____
______)
__________)
(____)
---.__(___)
"""
game_list = [rock, paper, scissors]
your_choice = int(input("What do you choose? Type 0 for Rock, 1 for Paper or 2 for Scissors.\n"))
print("your choice:-")
print(game_list[your_choice])
random_choice = random.randint(0, 2)
print(f"Computer chose:-{random_choice}")
print(game_list[random_choice])
if your_choice == 0 and random_choice == 2:
print("You Win!")
elif your_choice == 2 and random_choice == 1:
print("You Win!")
elif your_choice == 1 and random_choice == 0:
print("You Win!")
elif random_choice == 0 and your_choice == 2:
print("You lose")
elif random_choice == 2 and your_choice == 1:
print("You lose!")
elif random_choice == 1 and your_choice == 0:
print("You lose!")
elif your_choice == random_choice:
print("It's a Draw")