Getting startedFunctionsVariablesVariables 2InputsSelectionFlowchartsData typesPseudocode1Pseudocode2Subprogram1Subprogram2 |
Pseudocode explainedHow much pseudocode is there?Below is a list of pseudocode constructs that have already been covered. Click here for a PDF version.
Examples of pseudocodeSEND “Please enter the first number.” TO DISPLAY
RECEIVE firstNumber FROM KEYBOARD SEND “Please enter the second number.” TO DISPLAY RECEIVE secondNumber FROM KEYBOARD SET total to firstNumber + secondNumber SEND total TO DISPLAY What does this code Do? (click here to reveal)
The code asks for two different numbers, adds them together and displays the answer RECEIVE numberOfTeeth FROM (INTERGER) KEYBOARD
IF numberOfTeeth >= 0 AND length <= 32 THEN SEND “Seems normal” TO DISPLAY ELSE SEND “Too many teeth!” TO DISPLAY END IF What does this code Do? (click here to reveal)
1. The code asks for the number of teeth to be inputted 2. If the number of teeth is between 0 and 32, "Seems normal" is displayed 3. If the number entered is higher than 32, then "Too many teeth is displayed" Test you knowledge
Loading Reading pseudocode 03
Loading Pseudocode
Loading Reading pseudocode
|