Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In python please https://cs.rmtsu.edu/~sbarbosa/1170/private/PE7.pdf Debian.org Latest News Help a t MTSU Programming Exercise ou are tasked with developing a program to guess a random number.

In python please image text in transcribed
https://cs.rmtsu.edu/~sbarbosa/1170/private/PE7.pdf Debian.org Latest News Help a t MTSU Programming Exercise ou are tasked with developing a program to guess a random number. The program should have a main func generator. This inclusive and pass it to a function called randomGuess(r) where 'r' is an integer. The randomGuess function should then attempt to "guess' the random number argument, This should be accomplished by having the function initially guess a number from 1-100 where each guess is printed out. If the guess is correct, print a message. Otherwise, the program should determine if it is a high or low guess. The subsequent guesses) should restrict the range based on this feedback. For instance, if the number is 25 and the initial guess is 50, the program then the next guess should be limited between 1-49. Continuing, if the next guess is 10, the next guess would be restricted from 11-49. These guesses will continue until the number is guessed correctly tion that prompts a user for input that will be used as the seed to a random number main function should then generate a random number between 1 and 100 Sample run: Enter the random seed: 123 I've picked the number. time to guess Is it 50? Too high Is it 10? Too low ls it 25? Winner completing the program and testing the output for accuracy, add a comment block including name, course and section, current date, and assignment description. To submit the your completed assi appropriate file names: ignment, enter the following commands at the Ranger terminal substituting for the cript lastName- Exereise.log ls python3 yourProgram.py (Run the program with sample data) sit lph lastName Exereise log

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Build It For The Real World A Database Workbook

Authors: Wilson, Susan, Hoferek, Mary J.

1st Edition

0073197599, 9780073197593

More Books

Students also viewed these Databases questions