-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGuessNumber.py
More file actions
29 lines (24 loc) · 995 Bytes
/
GuessNumber.py
File metadata and controls
29 lines (24 loc) · 995 Bytes
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
import random
print("1.Scisors\n2.Paper\n3.Rock\n4.Exit\nNote:The answer should be either 1,2 or 3 only")
choice =int(input("What is your choice:"))
comp= random.randrange(1,3)
while choice != 4:
if choice==comp :
print('It\'s a draw')
elif choice == 1 and comp == 2 :
print('You win\nScisors cut paper')
elif choice == 2 and comp == 1 :
print('Computer wins\nScissors cut paper')
elif choice == 2 and comp == 3 :
print('You win\nPaper wraps rock')
elif choice == 3 and comp == 2 :
print('Computer wins\nPaper wraps rock')
elif choice == 3 and comp == 1 :
print('You win\n Rock bangs scissors')
elif choice == 1 and comp == 3 :
print('Computer wins\nRock bangs scissors')
else:
print('Not be a fool\nRead instruction')
print("1.Scisors\n2.Paper\n3.Rock\n4.Exit\nNote:The answer should be either 1,2 or 3 only")
choice = int(input('What is your choice:'))
print("Thanks for playing")