By the end of the lesson you will:
- Know what Pseudo-Code
- Create a simple Pseudo-code for an everyday scenario
- Apply your understanding to create Pseudo-code for a computer game
- Apply to your coursework
Part 1: What is Pseudo-code?:
1) Write a Pseudo code for one of these tasks?
- It is a method of representing a program structure without using a programming language. Think of it as a template for a program which any coder could take and use any programming language, it is a construct
- Getting dressed
- Making a toast
- Sending a letter of thanks
1) Write a Pseudo code for one of these tasks?
Reasons for using Pseudo-code:
- Most programs are developed using programming languages. These languages have specific syntax that must be used so that the program will run properly. Pseudocode is not a programming language, it is a simple way of describing a set of instructions that does not have to use specific syntax.
Part 2: Common Pseudo-code notation:
There is no strict set of standard notations for pseudocode, but some of the most widely recognised are: INPUT – indicates a user will be inputting something OUTPUT – indicates that an output will appear on the screen WHILE – a loop (iteration that has a condition at the beginning) FOR – a counting loop (iteration) REPEAT – UNTIL – a loop (iteration) that has a condition at the end IF – THEN – ELSE – a decision (selection) in which a choice is made (any instructions that occur inside a selection or iteration are usually indented) |
|
Part 3: Now it's your turn:
Try this Quiz
Read more about Pseudo code here
Complete this worksheet to test your understanding
- Write the Pseudo code for a player re-loading their weapon in code.
- Write the pseudo code for a player in Angry Birds hitting a building.
- Write the Pseudo code for a player in accelerating in Mario Karty!
Try this Quiz
Read more about Pseudo code here
Complete this worksheet to test your understanding