We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4dbc9a7 commit 2ef2e2eCopy full SHA for 2ef2e2e
RockPaperScizorGame/RockPaperScizor.py
@@ -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