Guess Random Number Why i m not able to enter input - python
<p>Below is my code to generate random number between 0 - 9 and checking with user input whether it is higher lower or equal. When I run the code, it is not taking input and showing</p>

<blockquote>
  <p>error in 'guessNumber = int(input("Guess a Random number between 0-9")) File "", line 1                                          '</p>
</blockquote>

<p>Can somebody please tell me where I'm making mistake</p>

<pre><code>#Guess Random Number
#Generate a Random number between 0 to 9

 import random
 turn = 0

 def guessRandom():
    secretNumber = random.randint(0,9)
    guessNumber = int(input("Guess a Random number between 0-9"))
    while secretNumber != guessNumber:
       if(secretNumber &gt; guessNumber):
          input("You have Guessed the number higher than secretNumber. Guess Again!")
          turn = turn + 1
       elif (secretNumber &lt; guessNumber):
          input("You have guessed the number lower than secretNumber. Guess Again! ")
       turn = turn + 1
    if(secretNumber == guessNumber):
        print("you Have Guessed it Right!")

guessRandom() 
</code></pre>

<p>You didn't get the new input into a variable - <code>input(...)</code> needs to be assigned to a variable so you can operate with the input.</p>

<p>Use </p>

<pre><code>guessNumber = input("You have Guessed the number higher than secretNumber. Guess Again!")
</code></pre>

<p>When the user guesses higher/ lower number.</p>

python