Priyanshu_Gupta

Guess The Number

Apr 9th, 2020
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | None | 0 0
  1. #guess the number game
  2.  
  3.  
  4. count=0
  5. while(count<10):
  6.     print("Enter Your Guessed Number ")
  7.     n=int(input())
  8.     if n==18:
  9.         print("Congrats You guessed The Exact Number")
  10.         break
  11.  
  12.     elif n<18:
  13.         print("Your Number Is Smaller\n","Number Of Gusses Left is",9-count,"\n")
  14.  
  15.     elif n>18:
  16.         print("Your Number Is Greater\n","Number Of Gusses Left is",9-count ,"\n")
  17.  
  18.     count=count+1
  19.     if count==10:
  20.       print("game over")
Add Comment
Please, Sign In to add comment