-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathminiproject02.py
More file actions
28 lines (21 loc) · 894 Bytes
/
Copy pathminiproject02.py
File metadata and controls
28 lines (21 loc) · 894 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
#---------------------------------------------------------------------------------------------------------
# Miniproject2 : Number Guessing Game
#---------------------------------------------------------------------------------------------------------
print("This is my Miniproject 2")
print("Title : Number Guessing Game")
import random
sec = random.randint(1,10)
print("Secret:", sec) #to know the secrect value assumed randomly
while True:
guess=int(input("Enter your guess:"))
if guess == sec:
print("Congrats!! Your Guess is Correct")
break
elif guess > sec:
print("Your Guess is Too High")
elif guess < sec:
print(" Your Guess is Too Low")
else:
print("Oops!! It's a Wrong Guessing")
print("--------Successfully completed----------")
#------------------------------------------------------------------------------------------------------------