Skip to content

Commit f309005

Browse files
Merge pull request seeditsolution#185 from varun-devops/patch-1
number guess game in python
2 parents 31fef52 + ffd031f commit f309005

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

number guess game

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import random
2+
r = random.randint(1,20)
3+
4+
while(True):
5+
inp = int(input())
6+
if(inp<r):
7+
print("oops,try a greater number")
8+
elif(inp>r):
9+
print("oops,try a smaller number")
10+
else:
11+
print("congrats you choosed write number")
12+
break;

0 commit comments

Comments
 (0)