forked from suresh-recode/LRT-Python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
25_stone_paper_scissor.py
40 lines (29 loc) · 1.12 KB
/
25_stone_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
import random
choice_list = ["stone", "paper", "scissor"]
for i in range(5):
system_choice = random.choice(choice_list)
user_input = input("Enter your choice :").lower()
print("System chosen : {} and User chosen : {}".
format(system_choice, user_input))
system_count = user_count = 0
# if system_choice == user_input:
# print("Tie")
if system_choice == "stone" and user_input == "paper":
# print("User wins")
user_count += 1
elif system_choice == "stone" and user_input == "scissor":
# print("System wins")
system_count += 1
elif system_choice == "paper" and user_input == "stone":
# print("System wins")
system_count += 1
elif system_choice == "paper" and user_input == "scissor":
# print("User wins")
user_count += 1
elif system_choice == "scissor" and user_input == "stone":
# print("User wins")
user_count += 1
elif system_choice == "scissor" and user_input == "paper":
# print("System wins")
system_count += 1
print("system : {} and user : {}".format(system_count, user_count))