Use the function you defined in Part 1 to write a program for "Guees the Number" game. In this game the user is to guess

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Use the function you defined in Part 1 to write a program for "Guees the Number" game. In this game the user is to guess

Post by answerhappygod »

Use The Function You Defined In Part 1 To Write A Program For Guees The Number Game In This Game The User Is To Guess 1
Use The Function You Defined In Part 1 To Write A Program For Guees The Number Game In This Game The User Is To Guess 1 (60.31 KiB) Viewed 25 times
Use the function you defined in Part 1 to write a program for "Guees the Number" game. In this game the user is to guess a random number in the range [1, 100] generated by the computer. Here are the steps that the program takes: 1. The program calls the function declared in Part 1 to generate a random integer in the range [1, 100]. 2. The program then asks the user to guess the number generated in the previous step. 3. If the user enters the correct number, the program alerts "You won!" and terminates. 4. If the number entered by the user is not in the range [1, 100], the program alerts an error message and goes to Step 2. 5. If the number entered by the user is less than the random number generated in Step 1, the program displays "Enter a larger value" and goes to Step 2. 6. If the number entered by the user is greater than the random number generated in Step 1, the program displays "Enter a smaller value" and goes to Step 2. The program continues until the user guesses the number correctly
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply