Question
VISUAL BASIC You will be creating a simple game, code in a variable to hold a number 1 through 10. The game will be inside
VISUAL BASIC
You will be creating a simple game, code in a variable to hold a number 1 through 10. The game will be inside of a loop whose test condition is to keep prompting the user to take a guess between 1 through 10. The guess MUST be using an Inputbox() command and it must be INSIDE the body of the loop. The loop will contain a an If test that will test for 3 condition; value too low, value too high, and correct value. If its too low or high a msgbox will pop up telling the player that their guess was too low or high. If the guess is the secret number then the game will tell you that you are correct and end the loop. The loops test condition can be one of 2 ways, test against the secret number for inquality <> or simply have a counting loop and don't update the count variable and use an Exit While to terminate the loop in the if test for the correct value. Pseudo code path for HW7 set secret to a value begin loop body prompt for guess with inputbox If test end loop body msgbox you won!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started