homework

myNum = 8 
print( ' Number guessing game\n ' )
 while True:
     guess = int (input( ' Please guess a number: ' ))
      if guess > myNum:
         print( ' Guess the big one ' )
     elif guess < myNum:
         print( ' Guess is too small ' )
      else :
         print( ' Congratulations, you guessed it right! ' )
          break

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325648009&siteId=291194637