
![[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
What is the name of the graphical method for expressing algorithm?
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
What is the name for ← ?
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
What will be the value of C:
A <- 10
C <- A = 5
Type answer...
13
IF-THEN-ELSE
# Pseudocode conditional statement:
IF score > 50 THEN
⠀PRINT "Pass"
ELSE
⠀PRINT "Fail"
ENDIF
14
Fill in the Blanks
What will be printed on screen:
A <- 10
IF A=5 THEN
⠀PRINT "Good"
ELSE
⠀PRINT "Not good"
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
In Python, what is the name of the pre-condition loop?
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
Direct Variation
Presentation
•
9th - 10th Grade
20 questions
Health problems
Presentation
•
9th - 10th Grade
22 questions
Pemrograman
Presentation
•
9th Grade
19 questions
NARRATIVE TEXT
Presentation
•
9th - 10th Grade
17 questions
Study Skills 1
Presentation
•
9th - 11th Grade
17 questions
Elements of Art - Shape
Presentation
•
9th - 10th Grade
20 questions
Angles of Triangles
Presentation
•
8th - 10th Grade
16 questions
Algoritma dan pemrograman
Presentation
•
10th Grade
Popular Resources on Wayground
6 questions
PRIDE Always and Everywhere
Presentation
•
12th Grade
20 questions
Lab Safety Quiz
Quiz
•
6th Grade
26 questions
KOR Review Kahoot Questions
Quiz
•
8th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
12 questions
Unit Zero lesson 2 cafeteria
Presentation
•
9th - 12th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
10 questions
Riddles Riddles fun Riddles
Quiz
•
6th - 12th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade