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
Get step-by-step solutions from verified subject matter experts
