The program in Phyton that meets the above requirements is:
# import the random module
import random
# generate a random number between 1 and 10
number = random.randint(1, 10)
# initialize the number of guesses to 0
guesses = 0
# prompt the user for a guess and keep track of the number of guesses
while True:
guess = int(input('Guess a number between 1 and 10: '))
guesses += 1
# if the guess is too low, let the user know
if guess < number:
print('Your guess is too low.')
# if the guess is too high, let the user know
elif guess > number:
print('Your guess is too high.')
# if the guess is correct, let the user know and exit the loop
else:
print('You guessed the number in', guesses, 'guesses!')
break
<h3>What is the explanation?</h3>
This software creates a random number between 1 and 10, prompts the user for a guess, and keeps track of how many guesses are made. If the user's guess is too low, it produces an error message. If the user's guess is too high, it produces an error notice.
If the user successfully guesses the number, it publishes a message informing them of their success and the number of guesses required and then exits the loop.
Learn more about the program:
brainly.com/question/11023419
#SPJ1