
![[IGCS] Pseudocode](https://cf.quizizz.com/img/presentation/default-img/presentation_title_img-1_default.jpg?w=200&h=200)
[IGCS] Pseudocode
Presentation
•
Computers
•
9th - 10th Grade
•
Practice Problem
•
Medium
Andy tsui
Used 22+ times
FREE Resource
15 Slides • 10 Questions
1
[IGCS] Pseudocode - 1
Variable, If, Conditional Loop

2
Pseudocode
helps us to express computer algorithms
3
Fill in the Blanks
Type answer...
4
Pseudocode is...
Not a programming language
The syntax (rules of the language) is loosely defined
Python is very much similar to Pseudocode
5
Comments
# Same as Python, comment starts with a hashtag
# Which means that these statements are ignored by computer
# Very useful to help people read your code
6
Variables
# The following statment assigns 1 to a variable called variable_name
variable_name ← 1
# When you write, you write ←, but sometimes I will type <- to represent the same thing
7
Fill in the Blanks
Type answer...
8
Open Ended
Describe what is this program doing:
INPUT name
INPUT age
PRINT "Hello", name, "you will be", age + 10, "years old in 10 years"
9
Logical Operator
# A = 5 means that to evaluate if A equals to 5
# And the result is a boolean type - i.e. either True or False, so:
A = 1
C <- A < 5
# C will be False
10
= or == or ← ?
In Math, if we write a=b means that a equals to b
Pseudocode is the same as math
In Python and many other languages (e.g. Java, C), we use = to represent assignment, so to represent logical test, we have to use ==, i.e. the above statement became a==b
11
Multiple Choice
In Pseudocode, what is the meaning of :
A = 5
Assign 5 to A
Test if A equals to 5
A equals to 5
None of the rest
12
Fill in the Blanks
Type answer...
13
IF-THEN-ELSE
# Pseudocode conditional statement:
IF score > 50 THEN
⠀PRINT "Pass"
ELSE
⠀PRINT "Fail"
ENDIF
14
Fill in the Blanks
Type answer...
15
Multiple Select
In Pseudocode, which of the following statements check if variable X is not zero?
IF x <- 0 THEN
IF x ≠ 0 THEN
IF x <> 0 THEN
IF not x=0 THEN
IF x != 0 THEN
16
Chaining IFs
IF score > 90 THEN
⠀PRINT "A+"
ELSE IF score > 80 THEN
⠀PRINT "A"
ELSE IF score > 70 THEN
⠀PRINT "B"
ELSE
⠀PRINT"C"
ENDIF
17
Conditional Loops
There are two types of conditional loops in Pseudocode
Pre-condition
Post-condition
18
Pre-condition loop
# Pre condition means that the exit condition appears at the start of loop
19
Fill in the Blanks
Type answer...
20
Pre condition loop in pseudocode
WHILE count < 10 DO
⠀count <- count + 1
ENDWHILE
21
Post condition loop
# There's no post condition loop in Python, but Pseudocode or languages like Java they have:
REPEAT
⠀count <- count + 1
UNTIL count > 10
# We sometimes called them REPEAT-UNTIL loop
22
Open Ended
Describe what is the following code doing:
REPEAT
⠀INPUT age
UNTIL age>0
23
Open Ended
Rewrite the following code using a while loop:
REPEAT
⠀INPUT weight
UNTIL weight > 10
24
Common validation pattern
Previous slide is common pattern for validation - Homework
25
Summary
Pseudocode is another way to express algorithm
We learnt about variables, condition and conditional loops in Pseudocode
[IGCS] Pseudocode - 1
Variable, If, Conditional Loop

Show answer
Auto Play
Slide 1 / 25
SLIDE
Similar Resources on Wayground
18 questions
Parallelogram
Presentation
•
9th - 10th Grade
18 questions
Mendel's Laws
Presentation
•
9th - 10th Grade
21 questions
Pythagorean Theorem Review
Presentation
•
9th - 10th Grade
17 questions
Cell Division
Presentation
•
9th - 10th Grade
20 questions
Apostrophe Lesson
Presentation
•
9th Grade
20 questions
Cell Cycle & Cancer
Presentation
•
9th - 10th Grade
19 questions
Parts of the motherboard
Presentation
•
10th Grade
20 questions
Algorithms and Programs- Control Structures
Presentation
•
8th - 11th Grade
Popular Resources on Wayground
15 questions
Grade 3 Simulation Assessment 1
Quiz
•
3rd Grade
22 questions
HCS Grade 4 Simulation Assessment_1 2526sy
Quiz
•
4th Grade
16 questions
Grade 3 Simulation Assessment 2
Quiz
•
3rd Grade
19 questions
HCS Grade 5 Simulation Assessment_1 2526sy
Quiz
•
5th Grade
17 questions
HCS Grade 4 Simulation Assessment_2 2526sy
Quiz
•
4th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
24 questions
HCS Grade 5 Simulation Assessment_2 2526sy
Quiz
•
5th Grade
20 questions
Math Review
Quiz
•
3rd Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
20 questions
Inventor Terms Exercise #1a
Quiz
•
9th Grade
31 questions
Inventor Vocabulary Review Sheet
Quiz
•
9th Grade
10 questions
Exploring Cybersecurity Techniques and Threats
Interactive video
•
6th - 10th Grade