• Home
  • Southern New Hampshire University
  • Intro To ScriptingIT 140
  • Introduction to Scripting Pseudocode

Introduction to Scripting Pseudocode

Tyler Barnes 4-3 Pseudocode Revisited 26 March 2022 Pseudocode for Higher/ Lower Game START IMPORT random function, so that a random number can be selected READ random. Seed variable INPUT prompt user for an integer value for seed-val in or to 'seed' the random generator INPUT integer for lower and upper variables READ lower, upper IF lower is higher than the upper THEN: INPUT variable integers again ELSE assign correct num variable READ correct num variable as the random generated number between the upper and lower 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 guess THEN OUTPUT 'Sorry, too low. IF user guess is higher THEN OUTPUT Sorry, too high.' IF user_guess is equal to correct_num THEN OUTPUT Great job, you got it! STO