[SOLVED] Python-Project 5-1: Debug the Guessing Game

35.99 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

Rate this product

Open the program named p5-1_guesses_errors.py which is in the Module 5 area. Find and fix all of the errors that it contains. Be sure to fill in the list of errors you found in the comment area in that file. When you’re done, the program should run as shown below

Console

Guess the number!

 

Enter the upper limit for the range of numbers: 100

I’m thinking of a number from 1 to 100.

 

Your guess: 50

Too low.

Your guess: 75

Too low.

Your guess: 87

Too low.

Your guess: 94

Too low.

Your guess: 97

Too high.

Your guess: 95

Too low.

Your guess: 96

You guessed it in 7 tries.

 

Play again? (y/n): y

 

Enter the upper limit for the range of numbers: 10

I’m thinking of a number from 1 to 10.

 

Your guess: 5

Too low.

Your guess: 7

Too low.

Your guess: 9

Too low.

Your guess: 10

You guessed it in 4 tries.

 

Play again? (y/n): n

 Bye!

Specifications

    Save the corrected file with the filename guessing_game_XXX.py where XXX is either your initials or your last name.

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.