Question: Python Create 2 variables named: Guess CompNum Generate a random number in Python and store it in the variable compNum . Generate the number in

Python

Create 2 variables named:

Guess

CompNum

Generate a random number in Python and store it in the variable compNum. Generate the number in the range of numbers you have selected. Ex 1 50, 1 100.

Prompt the user to guess a number between the range you selected. Ex. Guess a number between 1 and 100. Store this value in the variable guess.

Using the conditional structures you learned, compare the values and output to the user whether their guess is too low, too high or correct.

Print the result to the screen.

Run the code to display your output.

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!