Skip to content

Commit

Permalink
Guessing Game
Browse files Browse the repository at this point in the history
  • Loading branch information
sakshamjn authored Oct 11, 2018
1 parent b37bf08 commit 5107d37
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Guessing Game
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import random
userGuess = int(input("Enter your guessed no. b/w 0-100:"))
a = comGuess = random.randint(0,100)


while true:
comGuess=random.randint(0,100)
if userGuess>comGuess:
print("Guess Higher")
comGuess = random.randint(a,100)
a++

elif userGuess < comGuess:
print("Guess Lower")
comGuess = random.randint(0,a)
a++

else :
print ("Guessed Corectly")
break




0 comments on commit 5107d37

Please sign in to comment.