lower guesses left enter your guess ( - ) lower guesses left enter your guess ( - ) higher guesses left enter your guess ( - ) lower guesses left you lose the correct number is firstthink about what we will need in the programwe need random numbersso there will be an import statement at the beginning of the program and randint function somewhere else to allow the user to guess until they either guess right or run out of turnsone solution is to use while loop with condition that takes care of both of these possibilities there will be an input statement to get the user' guess as this is something that is repeatedly doneit will go inside the loop there will be an if statement to take care of the higher/lower thing as this comparison will be done repeatedly and will depend on the user' guessesit will go in the loop after the input statement there will be counting variable to keep track of how many turns the player has taken each time the user makes guessthe count will go up by oneso this statement will also go inside the loop next start coding those things that are easy to dofrom random import randint secret_num randint( , num_guesses while #some condition goes hereguess eval(input'enter your guess ( - )')num_guesses num_guesses higher/lower if statement goes here for the while loopwe want to continue looping as long as the user has not guessed the secret number and as long as the player has not used up all of their guesseswhile guess !secret_num and num_guesses < the higher/lower if statement can be done like this