4_3_Assignment_Pseudocode_Revisited

.docx

School

Southern New Hampshire University *

*We aren’t endorsed by this school

Course

140

Subject

History

Date

Apr 3, 2024

Type

docx

Pages

2

Uploaded by CoachButterflyPerson1866

Report
4-3 Assignment: Pseudocode Revisited By: Kerri Gregg Date: 02/04/2024 Pseudocode for Higher/Lower Game: DISPLAY: “Welcome to the Higher/Lower Game!” START Higher/Lower Game IMPORT random function, a random function that can be generated by the program READ randon.seed variable INPUT prompt user for an integer value for seedVal in order to ‘seed’ the random number generator INPUT integer for lower bound variable INPUT integer for upper bound variable READ lower, upper bound variables IF lower bound is higher than the upper bound THEN: INPUT variable integers again ELSE assign correct_num variable READ correct_num variable as the random number generated between ranges of upper and lower bound While TRUE guess loop INPUT prompt user to guess an integer OUTPUT “What is your guess?” READ user_guess variable
IF user_guess is lower than correct_num THEN OUTPUT “Too low!” IF user_guess is higher than correct_num THEN OUTPUT “Too High!” If user_guess is equal to correct_num THEN OUTPUT "Correct!” END
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help