Question: The program generates a random number between 1 and 1 0 0 0 0 0 0 0 . Using a guessing function, the program then
The program generates a random number between and Using a guessing function, the program then attempts to guess this number by generating random guesses. If the random guess is higher than the lottery number, the program tells the guessing function that the guess is bigger otherwise the guess is smaller or that the guess is correct. The program should contain the following functions:
guesslottery: function to guess the lottery value.
main: to begin the program execution and end the code. Python Library Functions allowed: len print list str input int type chr ord range random.randint and float
Any other library functions not allowed.
Desirable:
Error checking and well commented programs.
Input validation is preferable.
Trycatch are not allowed.
Builtin functions like isalpha isdigit isalnum etc., are not allowed.
Math module is not allowed. need code in python
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
