Skip to content

Commit 704e8d9

Browse files
committed
add program
1 parent 2011141 commit 704e8d9

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

Avarage Question/random_generate.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import random
2+
3+
rand= random.randint(1,100)
4+
print("Random Number=",rand)

game/guess_number.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import random
2+
3+
time=1
4+
print("You have 3 Times")
5+
rand=random.randint(1,100)
6+
while time<=3:
7+
a=int(input("Enter Number 1 to 100="))
8+
if a==rand:
9+
print("You Win")
10+
break
11+
elif a<rand:
12+
print("Try to Small number")
13+
else:
14+
print("Try to Biggest Number")
15+
time+=1
16+

0 commit comments

Comments
 (0)