top of page

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 🗺️

​​

  1. START

  2. Move Down one box.

  3. Move Right one box.

  4. Move Down one box.

  5. Move Right one box.

  6. Move Right one box.

  7. Move Down one box.

  8. Move Right one box.

  9. Move Down one box.

  10. Get Bella.

  11. 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