I need help with this assignment, any help would be much appreciated

Someone please help me with this assignment

Build a guessing game where the computer has to guess the correct number which was entered by the user between 1 and 100. You will work with Python’s random module (Links to an external site.), build functions, work with while loops and conditionals, and get user input. You will also output the number of times computer could not guess the number correctly

Program Output

This will happen when the program runs

Enter a number: 82

The computer takes a guess… 50

The computer takes a guess… 75

The computer takes a guess… 88

The computer takes a guess… 82

The computer guessed 82 and it was correct!

Hi Charlie, and welcome!

What have you tried? What code have you written?

We won’t do your assignment for you, but we can help when you run into problems.

Start by writing a function that asks the player for a number, and retrieves that number from them.

(Hint: the input(prompt) function will help.

Then write a function that will try to guess a number. (Hint: look at the random module.)

Then you will need to repeatedly call that guessing function, until the guess is correct.

Hint: you need a loop, Python has two sorts of loops: for loops, for when you know in advance how many times the loop will run; and while loops, when you don’t. Which one do you think you need?

Are you required to prevent the computer from guessing the same number more than once?