
![[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 23+ 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
20 questions
Triangle Inequalities
Presentation
•
9th - 10th Grade
20 questions
Domain and Range
Presentation
•
9th - 10th Grade
20 questions
Enzymes
Presentation
•
9th - 10th Grade
20 questions
Diction
Presentation
•
9th - 10th Grade
18 questions
Subject Verb Concord
Presentation
•
9th - 10th Grade
20 questions
Sustainability Lesson with Videos
Presentation
•
9th Grade
20 questions
Quadratic Functions
Presentation
•
9th Grade
20 questions
Basic Python Review Lesson
Presentation
•
9th Grade
Popular Resources on Wayground
5 questions
A Home on the Shore
Quiz
•
3rd Grade
28 questions
US History Regents Review
Quiz
•
11th Grade
6 questions
A Horse Tale
Quiz
•
3rd Grade
20 questions
Math Review
Quiz
•
3rd Grade
10 questions
Juneteenth History and Significance
Interactive video
•
5th - 8th Grade
20 questions
Dividing Fractions
Quiz
•
5th Grade
55 questions
A Long Walk to Water Final Review
Quiz
•
6th - 8th Grade
10 questions
Equation Word Problems
Quiz
•
7th Grade
Discover more resources for Computers
20 questions
Insurance
Quiz
•
9th - 12th Grade
10 questions
Juneteenth: History and Significance
Interactive video
•
7th - 12th Grade
20 questions
Summer Geometry QUIZ (Week 2)
Quiz
•
9th Grade
6 questions
Mayan Mathematics part 1
Presentation
•
9th - 12th Grade
25 questions
Biology Regents Review
Quiz
•
9th Grade
40 questions
Flags of the World
Quiz
•
KG - Professional Dev...
10 questions
Unit 9 Quiz
Quiz
•
9th - 12th Grade
60 questions
Biology Regents Review
Quiz
•
9th Grade