Skip to content

Commit

Permalink
Merge pull request #2 from rrnayak70/patch-2
Browse files Browse the repository at this point in the history
Create Number_Guessing_Game.py
  • Loading branch information
Alok-2002 authored Jul 19, 2023
2 parents af901db + d3d1e59 commit e90dcbc
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Number_Guessing_Game.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import random

number = random.randint(1, 100)


print("Guess a number between 1 and 100:")
guess = int(input())


while guess != number:
if guess < number:
print("Too low! Guess again:")
guess = int(input())
else:
print("Too high! Guess again:")
guess = int(input())


print("Congratulations, you guessed the number!")

0 comments on commit e90dcbc

Please sign in to comment.