Question: Programming Assignment #1: Guessing Game (Due before class on Friday, Jan. 31) Write a program to implement the following high-low number guessing game. Use from

Programming Assignment #1: Guessing Game (Due before class on Friday, Jan. 31)

Write a program to implement the following high-low number guessing game.

  • Use "from random import randint" and the "randint(1,100)" function to generate a random number between 1 and 100. (Hint: For testing your game it's good to print the answer that the player should be guessing. Of course when it's all working you will want to comment out that print statement.)
  • Let the user try to guess the number and say whether the guess is too high, too low, or correct.
  • Let the user try to guess over and over until they get the right answer (or run out of guesses).
  • Keep score and report how many tries the user needed.
  • Implement a way for the player to fail at the game. (Perhaps only 3-4 guesses allowed?)
  • For a B: Let the player play multiple times and keep track of the high score of all tries.
  • For an A: Use a file to store the top three highest scores and player names, so that they get remembered even when the program is stopped and restarted.

MUST BE DONE ACCORDING TO A GRADE GUIDLINES MUST BE DONE THROUGH PYTHON

MUST BE ABLE TO RUN THROUGH PYTHON WHEN COPY AND PASTED

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!