Question: For this exercise, you will create a class called GuessGame with several steps: Create a class called GuessGame. The class should not take any user

For this exercise, you will create a class called GuessGame with several steps:
Create a class called GuessGame.
The class should not take any user inputs or arguments upon instantiation (initialization).
In the __init__ method, set a self.rand_choice attribute to a random integer between 0 and 10(using the random module, import random).
Create a method in the class called reset_random that will reset the self.rand_choice attribute to a new random integer between 0 and 10.
Create a method called guess that uses the input() function to accept a user's guess for the random number. This method should print out a statement indicating whether or not the user's guess was correct.
Please always run examples to check

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 Programming Questions!