Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Jualus. INUL JUUSTELLCU ontinue 1) Ask the user how much money they start with. Using a while loop, determine how many days it will take

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Jualus. INUL JUUSTELLCU ontinue 1) Ask the user how much money they start with. Using a while loop, determine how many days it will take for their money to be more than 10,000 if the money doubles every day. For example, if the user types in 4000. The print out should say that it would take 2 days. 4000 -> 8000 -> 16000 2") 2) Ask the user for a number that is less than 5 or greater than or equal to 10. Use a diagnostic loop to check their input. If the number is not good, tell them their number was not in range and that they should try again. Once a good number is entered, print a message telling the user that the number entered is in the correct range. 3") 4") 3) Ask the user for a number between 1 and 10(inclusive). If they do not, tell them to try again and ask for the number again. Once they have entered an appropriate number, print all the multiples of that number between 1 and 100 (inclusive) 4) Ask the user to guess a number between 1 and 100. For this game, they are trying to guess the number 42. This will not be any fun after the first time they play, but that is the world we live in. Include a diagnostic to ensure the user is guessing in the appropriate range each time they guess.. Continue the loop until the user guesses the number and count the number of appropriate guesses. Example Shell Question 1 How much money do you start with?: 200 If your money doubles every day, it will take 6 days to get past $10000. Question 2 Enter a number greater than or equal to 10 or less than 5: 6 Not in range. Try again. Enter a number greater than or equal to 10 or less than 5: 7 Not in range. Try again. Enter a number greater than or equal to 10 or less than 5: 12 12 is greater than or equal to 10 or less than 5. Question 3 Enter a number between 1 and 10: 15 Not in range. Try again. Enter a number between 1 and 10: 6 6 12 18 24 30 36 42 48 54 60 66 72 78 84 90 96 Question 4 Please guess a number between 1 and 100(inclusive): 120 Not in range, try again. Please guess a number between 1 and 100(inclusive): 50 Too high. Try again. Please guess a number between 1 and 100(inclusive): -2 Not in range, try again. Please guess a number between 1 and 100(inclusive): 40 Too low. Try again. Please guess a number between 1 and 100(inclusive): 41 Too low. Try again. Please guess a number between 1 and 100(inclusive): 42 You got it in 4 tries. Good Job

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

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

More Books

Students also viewed these Databases questions