Skip to content

Commit 2ef2e2e

Browse files
authored
Add files via upload
1 parent 4dbc9a7 commit 2ef2e2e

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import random
2+
user_choice = int(input("Enter number for 0->For Rock\n1->For Paper\n2->For Scissor\n"))
3+
if user_choice < 0 or user_choice > 2:
4+
print("Please enter correct no from options given below.")
5+
else:
6+
comp_choice = random.randint(0,2)
7+
if comp_choice == user_choice:
8+
print("oops!It's a draw.")
9+
elif comp_choice == 0 and user_choice == 2:
10+
print("you loose")
11+
elif user_choice == 0 and comp_choice == 2:
12+
print("you win")
13+
elif comp_choice > user_choice:
14+
print("you loose.")
15+
elif user_choice > comp_choice:
16+
print("you win.")
17+
18+
19+

0 commit comments

Comments
 (0)