Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part One: Guessing Game (10%) Growing tired of all those free games with more ads than fun, your friend turns to you for entertainment. You're

image text in transcribed

Part One: Guessing Game (10%) Growing tired of all those "free" games with more ads than fun, your friend turns to you for entertainment. You're a 1337 programmer, build me something better!", they request. You confidently tackle this task, with the goal of putting EA out of business. Write a program that accepts two inputted integers from the user: a minimum value, and a maximum value. The inputted numbers should be accepted at the same time. For example: Enter a min, followed by a max number, separated by a space: 2 500 Ensure both inputted numbers are greater than 0. If they are not, print and error an exit your program early. Ensure the max number is greater than your min number by at least 30, otherwise, print an error and exit your program early. Ensure the max number is not greater than your min number by more than 1000, otherwise, print an error and exit your program early. Generate a random inte number between the min value, and the max value. Note this random number should be different every time you run your program (even with the same input). Ask your user to input an integer number between the inputted min and max numbers (they will be trying to guess the random number). If they guess the number correctly, print Winner and quit. If the guess is less than the random number 20 or more, print "A lot higher" If the guess is less than the random number by 10 or more and less than 20, print Higher If the guess is less than the random number by less than 10, print A little higher If the guess is more than the random number by 20 or more, print "A lot lower If the guess is more than the random number by 10 or more and less than 20, print "Lower" If the guess is more than the random number by less than 10, print "A little lower Continue to prompt the user for a new guess, and print the appropriate messages until the correct number is chosen. If the user inputs"-1" as their guess, print "Quitter and quit

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_2

Step: 3

blur-text-image_3

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

How Do I Use A Database Research Tools You Can Use

Authors: Laura La Bella

1st Edition

1622753763, 978-1622753765

More Books

Students also viewed these Databases questions

Question

What is a characteristic line, and why is it useful?

Answered: 1 week ago