

Pseudocode GCSE Computer Science
Presentation
•
Computers
•
6th - 9th Grade
•
Practice Problem
•
Medium
Paul Glyne-Thomas
Used 8+ times
FREE Resource
24 Slides • 14 Questions
1
Pseudocode GCSE Computer Science
Pseudocode 101

2
Programming Constructs
Programs are designed using common building blocks
These building blocks are known as programming constructs
They form the basis for all programs
3
Three basic programming constructs
Sequence is the order in which instructions occur and are processed
Selection determines which path a program takes when it is running
Iteration is the repeated execution of a section of code when a program is running
4
Three basic programming constructs
Sequence: The order in which you do things
Selection: Making a decision on which pathway you take
Iteration: Repeating an action until either it has happened a certain number of times or until a condition has been met
5
Multiple Choice
Which programming construct is demonstrated here?
Iteration
Selection
Sequence
6
There are two type of Iteration
Count-Controlled iteration
Condition-Controlled Iteration
7
Multiple Choice
What Construct is this:
Iteration
Selection
Sequence
8
What is an Algorithm?
A logical sequence of steps that solve a problem
You will be dealing with algorithms that solve all sorts of problems in different contexts
9
Multiple Choice
What Construct is this:
Iteration
Selection
Sequence
10
What is Pseudocode
Pseudocode is a shorthand language that people use to express how a computer program executes
11
Multiple Choice
What construct is this?
Iteration
Selection
Sequence
12
What is Pseudocode?
While there are no grammatical rules, you will need to be able to represent certain computing concepts
13
What is Pseudocode
Your examination board does use a particular kind of pseudocode, but they all work in a similar way.
14
Multiple Choice
What construct is this
Count controlled Loop
Infinite Loop
Condition controlled Loop
Sequence
15
What isn’t Pseudocode?
A REAL Computer Language
16
Multiple Choice
What is Pseudocode?
A High Level Computer Langugage
A Low Level Computer Language
It’s a way of describing a problem in a way that a coder may understand
It’s a cross-platform code
17
Variables
When you want to store a value in your computer program you use a variable.
18
Variables
It is easier to understand when you think of an example.
In nearly every game that you play you have a score.
Score will be represented by a value - a number
19
Variables
When you write your computer program:
You declare Score as a variable
This will allocate a place in memory where the value is stored
20
Multiple Choice
A variable is a place in memory where you store of value
TRUE
FALSE
21
Variables
Also notice that the word variable means changeable.
If someone describes the weather as variable, it means that it could be hot or cold, dry or wet.
22
Variables
A variable that you declare in a program will contain a value that may change over time, like your score in the game.
As you score more points the value assigned to the variable changes
23
Variable Definition
Named storage location in memory
Assigned a value
Value may change as program runs
24
Multiple Choice
The value of the variable cannot change once it's been set
True
False
25
Variables
Think of the variable as an empty box
You give the empty box a name
You keep things in it
You can change what you keep in that box
26
Multiple Choice
You would use a variable to store a piece of information whose value may change
TRUE
FALSE
27
Naming conventions
The last thing to consider about variables, is the name that you give them.
It is better to give them a short name, as this makes spelling mistakes less likely
Equally it is sensible to give the variable a name which explains what data it holds
28
Naming Conventions
If you are asked to create a program that multiplies the width of an object by its height and length, you might want to name the variables: Width, Height, and Length;
X, Y or Z would be a dreadful choice as you wouldn't know what these letters referred to
Imagine the issues if you were declaring hundreds of Variables
29
Multiple Choice
You have been asked to create a computer program that adds three numbers together. How many variables would you need to declare?
One
Two
Three
Four
30
Multiple Choice
A good name for a variable that is describing health would be H?
TRUE
FALSE
31
Constants
Constants are the same as variables in every way apart from one.
Can you guess what the difference is?
32
Multiple Choice
What is the difference between a constant and a variable?
A Constant does not need to be declared
A Constant may NOT be initialised
A Constant may NOT be changed while the program is running
There is NO difference
33
Constants
A Constant may NOT be changed while the program is running
You may assign any value you like to a constant but once the program is running, it may not be changed
34
Multiple Choice
Which of these should be declared as a constant?
High Score
XP
Pi
Your address
35
Multiple Choice
Imagine that you have declared your variable score. What piece of information is missing?
The Maximum Score possible
The Minimum Score possible
The Initial Value that Score is assigned
The Maximum length of the variable in characters
36
Assignment
When you are dealing with computers, don't forget that they don't know anything unless you tell them.
Imagine that you have declared your variable score, you also need to tell the program what the score is at the start of the game. In other words, when you start the game your variable, score will need to be set to zero and you must tell the program to do that. You do that by a process called assignment.
37
Initialisation
Giving a variable value is called assignment, a special type of assignment is setting the value to 0, this is known as initialisation.
38
Pseudocode GCSE Computer Science
Pseudocode 101

Show answer
Auto Play
Slide 1 / 38
SLIDE
Similar Resources on Wayground
31 questions
Scatter Plots, Linear Regression, Correlation Coefficient
Presentation
•
7th - 9th Grade
31 questions
Physical and Chemical Changes Review
Presentation
•
6th - 8th Grade
31 questions
Primary and Secondary Sources
Presentation
•
6th - 8th Grade
31 questions
Evolution and Natural Selection
Presentation
•
6th - 8th Grade
33 questions
Colonial Life
Presentation
•
6th - 8th Grade
35 questions
Boolean L2
Presentation
•
KG
30 questions
Input, Output & Processing
Presentation
•
6th - 8th Grade
Popular Resources on Wayground
20 questions
"What is the question asking??" Grades 3-5
Quiz
•
1st - 5th Grade
20 questions
“What is the question asking??” Grades 6-8
Quiz
•
6th - 8th Grade
10 questions
Fire Safety Quiz
Quiz
•
12th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
34 questions
STAAR Review 6th - 8th grade Reading Part 1
Quiz
•
6th - 8th Grade
20 questions
“What is the question asking??” English I-II
Quiz
•
9th - 12th Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
47 questions
8th Grade Reading STAAR Ultimate Review!
Quiz
•
8th Grade