Search Header Logo
Pseudocode GCSE Computer Science

Pseudocode GCSE Computer Science

Assessment

Presentation

Computers

6th - 9th Grade

Practice Problem

Medium

Created by

Paul Glyne-Thomas

Used 8+ times

FREE Resource

24 Slides • 14 Questions

1

Pseudocode GCSE Computer Science

Pseudocode 101

Slide image

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?

1

Iteration

2

Selection

3

Sequence

6

There are two type of Iteration

  • Count-Controlled iteration

  • Condition-Controlled Iteration

7

Multiple Choice

What Construct is this:

1

Iteration

2

Selection

3

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:

1

Iteration

2

Selection

3

Sequence

10

What is Pseudocode

Pseudocode is a shorthand language that people use to express how a computer program executes

Slide image

11

Multiple Choice

What construct is this?

1

Iteration

2

Selection

3

Sequence

12

What is Pseudocode?

While there are no grammatical rules, you will need to be able to represent certain computing concepts

Slide image

13

What is Pseudocode

Your examination board does use a particular kind of pseudocode, but they all work in a similar way.

Slide image

14

Multiple Choice

What construct is this

1

Count controlled Loop

2

Infinite Loop

3

Condition controlled Loop

4

Sequence

15

What isn’t Pseudocode?

A REAL Computer Language

16

Multiple Choice

Question image

What is Pseudocode?

1

A High Level Computer Langugage

2

A Low Level Computer Language

3

It’s a way of describing a problem in a way that a coder may understand

4

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

1

TRUE

2

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

1

True

2

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

1

TRUE

2

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?

1

One

2

Two

3

Three

4

Four

30

Multiple Choice

A good name for a variable that is describing health would be H?

1

TRUE

2

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?

1

A Constant does not need to be declared

2

A Constant may NOT be initialised

3

A Constant may NOT be changed while the program is running

4

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?

1

High Score

2

XP

3

Pi

4

Your address

35

Multiple Choice

Imagine that you have declared your variable score. What piece of information is missing?

1

The Maximum Score possible

2

The Minimum Score possible

3

The Initial Value that Score is assigned

4

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

Slide image

Show answer

Auto Play

Slide 1 / 38

SLIDE