top of page

MALABAR SECONDARY SCHOOL


PSEUDOCODES
In this Lesson you will learn:
1. What are pseudocodes.
2. How to write simple pseudocodes.

Now take a look at Activity One from your lesson on algorithms.
Take a look at an example of how this can be written using pseudocode:
Keep Movin' Pseudocode 🗺️
-
START
-
Move Down one box.
-
Move Right one box.
-
Move Down one box.
-
Move Right one box.
-
Move Right one box.
-
Move Down one box.
-
Move Right one box.
-
Move Down one box.
-
Get Bella.
-
STOP
Now study the following pseudocode:
START
INPUT number
IF number > 0
THEN OUTPUT "Positive"
ELSE OUTPUT "Not Positive"
END IF
END
If the user enters the number 0 and then the number -5 on two separate runs of the algorithm, what will be the output, respectively?
(A) "Positive", "Positive"
(B) "Positive", "Not Positive"
(C) "Not Positive", "Positive"
(D) "Not Positive", "Not Positive"
Did you figure out the answer?
The answer is D
Based on what we discussed above:
-
Pseudocodes
-
As the name implies pseudo – fake code, not an actual programming language but very close.
-
bottom of page