Question: This project uses the random module in Python. The program will first randomly generate a number unknown to the user. The user needs to guess
This project uses the random module in Python.
The program will first randomly generate a number unknown to the user.
The user needs to guess what that number is. (In other words, the user needs to be able to input information.)
Youll need to check the difference between the inputted number and the randomly generated numbers and then compare the numbers.
If the users guess is wrong, the program should return some sort of indication as to how wrong (e.g. The number is too high or too low).
If the user guesses correctly, a positive indication should appear.
Concepts to keep in mind:
Random function
Variables
Integers
Input/Output
While loops
If/Else statements
--------------------------------------------------------------
--------------------------------------------------------------
For example:
--------------------------------------------------------------
import random
random_number = random.randrange(1, 51)
while True:
# TODO: Write your code here
I need the simple code in python language fast please
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
