0% found this document useful (0 votes)
4 views

Pseudocode

notes on psuedocode year 9 computing
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Pseudocode

notes on psuedocode year 9 computing
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 12

PSEUDOCODE

Lesson 2
STARTER
Spot the difference

1.Initialize a sum variable to


zero.
2.Iterate through each number
in the list.
3.Add each number to the sum.
4.Bring out the sum.
OBJECTIVE

• - Definition and purpose of pseudocode


- Key characteristics of pseudocode
- Relationship between pseudocode and
algorithms
- Common pseudocode structures and convention
SUCCESS CRITERIA
I can represent algorithm with
pseudocodes
WHAT IS PSEUDOCODE?

Pseudocode is a simple, informal


way to describe how a computer
program or algorithm works.

It uses plain language and basic


programming structures to
outline the steps of a program.

Question: Can you think of a


real-life situation where you use
step-by-step instructions?
KEY CHARACTERISTICS OF PSEUDOCODE

1. Uses simple, everyday language


2. Is not tied to any specific programming
language
3. Focuses on logic and problem-solving steps
4. Can be read and understood by both
programmers and non-programmers
PSEUDOCODE AND ALGORITHMS

● An algorithm is a step-by-step procedure to solve a


problem
● Pseudocode is a way to express algorithms with a
programming logic
● Pseudocode helps refine and improve algorithms before
coding
PSEUDOCODE CONVENTIONS

● Use capital letters for keywords (IF, THEN,


ELSE, WHILE)
● Indent nested statements for clarity
● Use simple arithmetic symbols (+, -, *, /)
● Write one statement per line
● Use END statements to close structures
(ENDIF, ENDWHILE)
COMMON PSEUDOCODE STRUCTURES:
DECISION

Decision: Choosing between different actions based on a


condition

Example:

IF age is less than 13 THEN

Display "You're too young for this game"

ELSE

Display "Welcome to the game!" Can you write this into an


algorithm?
ENDIF
COMMON PSEUDOCODE STRUCTURES: LOOP

Loop: Repeating a set of instructions multiple times

Example:

SET counter to 1

WHILE counter is less than or equal to 5

Display "Count: " + counter

Add 1 to counter

ENDWHILE

Can you write this into an


algorithm?
PRACTICE TIME

Try writing pseudocode for a simple task, like making a sandwich or brushing your
teeth.

Question: How can pseudocode help you in subjects other than computer science?
CLASSWORK 1

ALGORITHMS
• Explain an algorithm
• List three key characteristics of an algorithm
• Write an algorithm to add a list of numbers and output
the total

You might also like