Question
Make a script that will allow users to play a guessing name. This script must allow a user to enter a number 1-10. Give the
Make a script that will allow users to play a guessing name. This script must allow a user to enter a number 1-10. Give the user 5 tries to guess the correct answer. See below for specific requirements of this guessing game script. Use the file included below and answer questions 1-10. 1-3. Complete header comments. 4. Import Random Module 5. Make a variable named numbers. It needs to generate a number between 1 to 10. 6. Make a variable named player_name. It needs to prompt the user to enter his/her name. 7. Make a variable named number_of_guesses and assign 0 to it. 8. Print a string that includes the player_name variable. It should say: player_name, I am guessing a number between 1 and 10! 9. Make a WHIlE Loop. Allow the user 5 attempts to guess the number. If the number is too low print "Your guess is too low". If the number is too high print "Your guess is too high". Make a break if the user answers it correctly. 10. Verify if the user has guessed the number or not. If they did, then print a message for them along with the number of tries. If the player couldn't guess the number at the end then print the number along with a message.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started