Write a pseudocode structure that assigns the value of \"low\" to the variable n
ID: 3698205 • Letter: W
Question
Write a pseudocode structure that assigns the value of "low" to the variable named outcome if the variable named userGuess is less than 42; it assigns "high" to outcome if it is above 42; and assigns "exactly right" to outcome if userGuess is equal to 42. Then, display the result to the screen with a message that tells the user: Your guess at the number is --and then append the value to display. ** Just create the pseudocode for the structure, not the whole program. No need to declare variable types.
Explanation / Answer
if(userGuess < 42)
outcome = "low";
else if(userGuess > 42)
outcome = "high";
else
outcome = "exactly right";
print "Your guess at the number is "+outcome;
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.