Search Header Logo
Y12 Lesson

Y12 Lesson

Assessment

Presentation

•

Computers

•

8th - 10th Grade

•

Medium

Created by

C N

Used 1+ times

FREE Resource

34 Slides • 22 Questions

1

media

OCR AS Level

(H046)

OCR A Level

(H446)

Teacher site: craigndave.org | Student site: student.craigndave.org | Smart revise: smartrevise.co.uk

SLR6 Software development

• Writing and following algorithms

2

Recap Software Methodologies

3

Multiple Select

Select the real methodologies:

1

Agile

2

XP

3

XD

4

Spiral

5

Waterfall

4

Multiple Choice

Iterative development methodology which values end-user input:

1

XP

2

Agile

3

Waterfall

4

Spiral

5

RAD

5

Multiple Choice

Iterative development methodology which values code quality:

1

XP

2

Agile

3

Waterfall

4

Spiral

5

RAD

6

Multiple Choice

Iterative development methodology which values speed of development:

1

XP

2

Agile

3

Waterfall

4

Spiral

5

RAD

7

Multiple Choice

Iterative development methodology which focuses on risk-management:

1

XP

2

Agile

3

Waterfall

4

Spiral

5

RAD

8

Multiple Choice

Sequential development methodology which focuses on comprehensive documentation:

1

XP

2

Agile

3

Waterfall

4

Spiral

5

RAD

9

Multiple Choice

A small start-up who want to get a prototype onto the market for testing should use:

1

XP

2

Agile

3

Waterfall

4

Spiral

5

RAD

10

Multiple Choice

A large company who want to develop their software so people actually want to use it should use:

1

XP

2

Agile

3

Waterfall

4

Spiral

5

RAD

11

Multiple Choice

A processor company who need to develop high-quality code with minimal errors should use:

1

XP

2

Agile

3

Waterfall

4

Spiral

5

RAD

12

Multiple Choice

A diagram that represents a set of instructions is called:

1

Flow Chart

2

Pseudocode

3

Shapes

13

Recap on representing algorithms

14

Multiple Choice

Question image

What is this flowchart symbol called?

1

connector

2

decision box

3

process box

4

subroutine box

15

Multiple Choice

What is the purpose of a rectangle within a flowchart?
1

Process

2
Input / Output
3
Decision
4
Start / Stop

16

Multiple Choice

Question image

What is this flowchart symbol called?

1

connector

2

decision box

3

process box

4

subroutine box

17

Multiple Choice

Question image
What is used to connect the flowchart symbols together?
1
Rectangles
2
Lines
3
Arrows
4
Patterns

18

Multiple Choice

What does a variable do?

1

Says a name variable

2

Prints out a name variable

3

Stores a value and can be used many times

4

Collects an output and stores it

5

Helps find things in a program

19

Multiple Choice

Question image

What is the programming structure labelled a.

1

Selection

2

Sequence

3

Iteration

4

None of the above.

20

Multiple Choice

Question image

What is the programming structure labelled b.

1

Selection

2

Sequence

3

Iteration

4

None of the above.

21

media

OCR H046/H466

SLR6 Software development | Algorithms

•Algorithm: A sequence of steps
designed to perform a task.

•An algorithm may be constructed to
describe the operation of a complete
system or a particular part of it.

What is an algorithm?

22

media

OCR H046/H466

SLR6 Software development | Algorithms

What is an algorithm?

•We carry out algorithms in everyday
life without even thinking about it.

•When you cross a road, you perform
a sequence of steps designed to get
you to the other side safely:

oStop before crossing.

oLook left and right.

oIs the road clear?

oIf not, press the crossing button.

oWait for the lights to turn red.

oCross when it’s safe to do so.

•Designing algorithms to solve
computer problems is no different –
you still need to think about the
sequence of steps required.

23

media

OCR H046/H466

SLR6 Software development | Algorithms

How to produce algorithm using pseudocode and flowcharts

In the exam and your project you need to be able to create,
interpret, correct and refine algorithms
using:

•Pseudocode

•Flowcharts

•High-level language code

24

media

OCR H046/H466

SLR6 Software development | Algorithms

Flowcharts

•A flowchart is one method of
representing the sequence of steps
in an algorithm in diagram form.

Start

Input number 1
from keyboard

Input number 2
from keyboard

Stop

Is number
1 greater

than

number 2?

Output, “The
largest number
is” number 1

Output, “The
largest number
is” number 2

YES

NO

25

media

OCR H046/H466

SLR6 Software development | Algorithms

Flowcharts

NO

•A flowchart is one method of
representing the sequence of steps
in an algorithm in diagram form.

Start

Input number 1
from keyboard

Input number 2
from keyboard

Stop

Is number
1 greater

than

number 2?

Output, “The
largest number
is” number 1

Output, “The
largest number
is” number 2

YES

NO

26

media

OCR H046/H466

SLR6 Software development | Algorithms

•Pseudocode is an alternative, text-
based method of representing the
sequence of steps in an algorithm.

•Pseudocode can be thought of as
simplified programming code.

•The prefix pseudo means false or not
genuine.

•Writing pseudocode allows us to lay
down the logic of a problem in an
“almost-like-real-code” way without
worrying about the rules and syntax
of a particular language.

Pseudocode

27

media

OCR H046/H466

SLR6 Software development | Algorithms

//Program to output the largest of the two numbers

number1 = INPUT()

number2 = INPUT()

IF number1 > number2 THEN

PRINT(“The largest number is” + number1)

ELSE

PRINT(“The largest number is” + number2)

ENDIF

Pseudocode
Start

Input number 1
from keyboard

Input number 2
from keyboard

Stop

Is number
1 greater

than

number 2?
Output, “The
largest number
is” number 1

Output, “The
largest number
is” number 2

YES

NO

28

media
media

OCR H046/H466

SLR6 Software development | Algorithms

//Program to output the largest of the two numbers

number1 = INPUT()

number2 = INPUT()

IF number1 > number2 THEN

PRINT(“The largest number is” + number1)

ELSE

PRINT(“The largest number is” + number2)

ENDIF

Pseudocode

YES

NO

Start

Input number 1
from keyboard

Input number 2
from keyboard

Stop

Is number
1 greater

than

number 2?
Output, “The
largest number
is” number 1

Output, “The
largest number
is” number 2

29

media
media

OCR H046/H466

SLR6 Software development | Algorithms

//Program to output the largest of the two numbers

number1 = INPUT()

number2 = INPUT()

IF number1 > number2 THEN

PRINT(“The largest number is” + number1)

ELSE

PRINT(“The largest number is” + number2)

ENDIF

Pseudocode

YES

NO

Start

Input number 1
from keyboard

Input number 2
from keyboard

Stop

Is number
1 greater

than

number 2?
Output, “The
largest number
is” number 1

Output, “The
largest number
is” number 2

30

media

OCR H046/H466

SLR6 Software development | Algorithms

//Program to output the largest of the two numbers

number1 = INPUT()

number2 = INPUT()

IF number1 > number2 THEN

PRINT(“The largest number is” + number1)

ELSE

PRINT(“The largest number is” + number2)

ENDIF

Pseudocode
Start

Input number 1
from keyboard

Input number 2
from keyboard

Stop

Is number
1 greater

than

number 2?

Output, “The
largest number
is” number 1

Output, “The
largest number
is” number 2

YES

NO

31

media

OCR H046/H466

SLR6 Software development | Algorithms

//Program to output the largest of the two numbers

number1 = INPUT()

number2 = INPUT()

IF number1 > number2 THEN

PRINT(“The largest number is” + number1)

ELSE

PRINT(“The largest number is” + number2)

ENDIF

Pseudocode
Start

Input number 1
from keyboard

Input number 2
from keyboard

Stop

Is number
1 greater

than

number 2?
Output, “The
largest number
is” number 1

Output, “The
largest number
is” number 2

YES

NO

32

media
media

OCR H046/H466

SLR6 Software development | Algorithms

//Program to output the largest of the two numbers

number1 = INPUT()

number2 = INPUT()

IF number1 > number2 THEN

PRINT(“The largest number is” + number1)

ELSE

PRINT(“The largest number is” + number2)

ENDIF

Pseudocode
Start

Input number 1
from keyboard

Input number 2
from keyboard

Stop

Is number
1 greater

than

number 2?
Output, “The
largest number
is” number 1

Output, “The
largest number
is” number 2

YES

NO

33

media

OCR H046/H466

SLR6 Software development | Algorithms

Refining algorithms
Start

Input number 1
from keyboard

Input number 2
from keyboard

Stop

Is number
1 greater

than

number 2?
Output, “The
largest number
is” number 1

Output, “The
largest number
is” number 2

YES

NO

We're going to refine this
algorithm to increase the
number of inputs from two
to three and output the
largest of the three numbers.

34

media

OCR H046/H466

SLR6 Software development | Algorithms

Refining algorithms
Start

Input number 1
from keyboard

Input number 2
from keyboard

Stop

Is number
1 greater

than

number 2?
Output, “The
largest number
is” number 1

Output, “The
largest number
is” number 2

YES

NO

We're going to refine this
algorithm to increase the
number of inputs from two
to three and output the
largest of the three numbers.

35

media
media

OCR H046/H466

SLR6 Software development | Algorithms

Refining algorithms
Start

Input number 1
from keyboard

Stop

Is number 1
greater than
number 2?

Output, “The largest
number is” number

1

Output, “The largest
number is” number

2

YES

NO

Input number 2
from keyboard

Input number 3
from keyboard

We're going to refine this
algorithm to increase the
number of inputs from two
to three and output the
largest of the three numbers.

36

media

OCR H046/H466

SLR6 Software development | Algorithms

Refining algorithms
Start

Input number 1
from keyboard

Stop

Is number 1
greater than
number 2?

Output, “The largest
number is” number

1

Output, “The largest
number is” number

2

YES

NO

Input number 2
from keyboard

Input number 3
from keyboard

We're going to refine this
algorithm to increase the
number of inputs from two
to three and output the
largest of the three numbers.

37

media
media
media
media

OCR H046/H466

SLR6 Software development | Algorithms

Refining algorithms
Start

Input number 1
from keyboard

Stop

Is number 1
greater than
number 2?

YES

NO

Input number 2
from keyboard

Input number 3
from keyboard

Output “The

largest number
is” number 3

Is number 2
greater than
number 3?

Is number 1
greater than
number 3?

Output “The

largest number
is” number 2

Output “The

largest number
is” number 1

NO

NO

YES

YES

We're going to refine this
algorithm to increase the
number of inputs from two
to three and output the
largest of the three numbers.

38

media

OCR H046/H466

SLR6 Software development | Algorithms

Flowcharts

YES

NO

Start

Enter the nitrate
level: a number
between 1 and 50

Output “Dose

0.5ml”

Stop

Is nitrate
above 10?

Is nitrate
above 2.5?

Is nitrate
above 1?

Output “Dose

1ml”

Output “Dose

2ml”

Output “Dose

3ml”

YES

YES

NO

NO

A flowchart for an algorithm that calculates
how much carbon to dose into a fish tank to

maintain safe nitrate levels.

39

media

OCR H046/H466

SLR6 Software development | Algorithms

Refining algorithms

//Program to output the largest of the three numbers

number1 = INPUT()

number2 = INPUT()

number3 = INPUT()

IF number1 > number2 THEN

IF number 1 > number 3 THEN

PRINT(“The largest number is” + number1)

ELSE

PRINT(“The largest number is” + number3)

ENDIF

ELSE

IF number2 > number 3 THEN

PRINT(“The largest number is” + number2)

ELSE

PRINT(“The largest number is” + number3)

ENDIF

ENDIF

Start

Input number 1
from keyboard

Stop

Is number 1
greater than
number 2?

YES

NO

Input number 2
from keyboard

Input number 3
from keyboard

Output “The

largest number
is” number 3

Is number 2
greater than
number 3?

Is number 1
greater than
number 3?

Output “The

largest number
is” number 2

Output “The

largest number
is” number 1

NO

NO

YES

YES

40

media

OCR H046/H466

SLR6 Software development | Algorithms

Flowcharts

YES

NO

Start

Enter the nitrate
level: a number
between 1 and 50

Output “Dose

0.5ml”

Stop

Is nitrate
above 10?

Is nitrate
above 2.5?

Is nitrate
above 1?

Output “Dose

1ml”

Output “Dose

2ml”

Output “Dose

3ml”

YES

YES

NO

NO

A flowchart for an algorithm that calculates
how much carbon to dose into a fish tank to

maintain safe nitrate levels.

41

Multiple Choice

Question image

What happens if the nitrate level is 45

1

3ml

2

30ml

3

1ml

4

0.5ml

42

Multiple Choice

Question image

What happens if the nitrate level is 6

1

3ml

2

30ml

3

1ml

4

0.5ml

43

Multiple Choice

Question image

What happens if the nitrate level is 0.2

1

3ml

2

30ml

3

1ml

4

0.5ml

44

media

OCR H046/H466

SLR6 Software development | Algorithms

Flowcharts

//Program to output the carbon source dose

Nitrate = INPUT(“Enter the nitrate level:

a number between 1 and 50”)

IF nitrate > 10 THEN

PRINT(“Dose 3ml”)

ELSEIF nitrate > 2.5 THEN

PRINT(“Dose 2ml”)

ELSEIF nitrate > 1 THEN

PRINT(“Dose 1ml”)

ELSE

PRINT(“Dose 0.5ml”)

ENDIF

ENDIF

ENDIF

YES

NO

Start

Enter the nitrate
level: a number
between 1 and 50

Output “Dose

0.5ml”

Stop

Is nitrate
above 10?

Is nitrate
above 2.5?

Is nitrate
above 1?

Output “Dose

1ml”

Output “Dose

2ml”

Output “Dose

3ml”

YES

YES

NO

NO

45

media
media

OCR H046/H466

SLR6 Software development | Algorithms

Flowcharts

//Program to output the carbon source dose

Nitrate = INPUT(“Enter the nitrate level:

a number between 1 and 50”)

IF nitrate > 10 THEN

PRINT(“Dose 3ml”)

ELSEIF nitrate > 2.5 THEN

PRINT(“Dose 2ml”)

ELSEIF nitrate > 1 THEN

PRINT(“Dose 1ml”)

ELSE

PRINT(“Dose 0.5ml”)

ENDIF

ENDIF

ENDIF

YES

NO

Start

Enter the nitrate
level: a number
between 1 and 50

Output “Dose

0.5ml”

Stop

Is nitrate
above 10?

Is nitrate
above 2.5?

Is nitrate
above 1?

Output “Dose

1ml”

Output “Dose

2ml”

Output “Dose

3ml”

YES

YES

NO

NO

46

media
media

OCR H046/H466

SLR6 Software development | Algorithms

Flowcharts

//Program to output the carbon source dose

Nitrate = INPUT(“Enter the nitrate level:

a number between 1 and 50”)

IF nitrate > 10 THEN

PRINT(“Dose 3ml”)

ELSEIF nitrate > 2.5 THEN

PRINT(“Dose 2ml”)

ELSEIF nitrate > 1 THEN

PRINT(“Dose 1ml”)

ELSE

PRINT(“Dose 0.5ml”)

ENDIF

ENDIF

ENDIF

YES

NO

Start

Enter the nitrate
level: a number
between 1 and 50

Output “Dose

0.5ml”

Stop

Is nitrate
above 10?

Is nitrate
above 2.5?

Is nitrate
above 1?

Output “Dose

1ml”

Output “Dose

2ml”

Output “Dose

3ml”

YES

YES

NO

NO

47

media

OCR H046/H466

SLR6 Software development | Algorithms

Flowcharts

//Program to output the carbon source dose

Nitrate = INPUT(“Enter the nitrate level:

a number between 1 and 50”)

IF nitrate > 10 THEN

PRINT(“Dose 3ml”)

ELSEIF nitrate > 2.5 THEN

PRINT(“Dose 2ml”)

ELSEIF nitrate > 1 THEN

PRINT(“Dose 1ml”)

ELSE

PRINT(“Dose 0.5ml”)

ENDIF

ENDIF

ENDIF

YES

NO

Start

Enter the nitrate
level: a number
between 1 and 50

Output “Dose

0.5ml”

Stop

Is nitrate
above 10?

Is nitrate
above 2.5?

Is nitrate
above 1?

Output “Dose

1ml”

Output “Dose

2ml”

Output “Dose

3ml”

YES

YES

NO

NO

48

media

OCR H046/H466

SLR6 Software development | Algorithms

Flowcharts

//Program to output the carbon source dose

Nitrate = INPUT(“Enter the nitrate level:

a number between 1 and 50”)

IF nitrate > 10 THEN

PRINT(“Dose 3ml”)

ELSEIF nitrate > 2.5 THEN

PRINT(“Dose 2ml”)

ELSEIF nitrate > 1 THEN

PRINT(“Dose 1ml”)

ELSE

PRINT(“Dose 0.5ml”)

ENDIF

ENDIF

ENDIF

YES

NO

Start

Enter the nitrate
level: a number
between 1 and 50

Output “Dose

0.5ml”

Stop

Is nitrate
above 10?

Is nitrate
above 2.5?

Is nitrate
above 1?

Output “Dose

1ml”

Output “Dose

2ml”

Output “Dose

3ml”

YES

YES

NO

NO

49

media

OCR H046/H466

SLR6 Software development | Algorithms

Flowcharts

//Program to output the carbon source dose

Nitrate = INPUT(“Enter the nitrate level:

a number between 1 and 50”)

IF nitrate > 10 THEN

PRINT(“Dose 3ml”)

ELSEIF nitrate > 2.5 THEN

PRINT(“Dose 2ml”)

ELSEIF nitrate > 1 THEN

PRINT(“Dose 1ml”)

ELSE

PRINT(“Dose 0.5ml”)

ENDIF

ENDIF

ENDIF

YES

NO

Start

Enter the nitrate
level: a number
between 1 and 50

Output “Dose

0.5ml”

Stop

Is nitrate
above 10?

Is nitrate
above 2.5?

Is nitrate
above 1?

Output “Dose

1ml”

Output “Dose

2ml”

Output “Dose

3ml”

YES

YES

NO

NO

50

media

OCR H046/H466

SLR6 Software development | Algorithms

Flowcharts

//Program to output the carbon source dose

Nitrate = INPUT(“Enter the nitrate level:

a number between 1 and 50”)

IF nitrate > 10 THEN

PRINT(“Dose 3ml”)

ELSEIF nitrate > 2.5 THEN

PRINT(“Dose 2ml”)

ELSEIF nitrate > 1 THEN

PRINT(“Dose 1ml”)

ELSE

PRINT(“Dose 0.5ml”)

ENDIF

ENDIF

ENDIF

YES

NO

Start

Enter the nitrate
level: a number
between 1 and 50

Output “Dose

0.5ml”

Stop

Is nitrate
above 10?

Is nitrate
above 2.5?

Is nitrate
above 1?

Output “Dose

1ml”

Output “Dose

2ml”

Output “Dose

3ml”

YES

YES

NO

NO

51

media

OCR H046/H466

SLR6 Software development | Algorithms

Flowcharts

//Program to output the carbon source dose

Nitrate = INPUT(“Enter the nitrate level:

a number between 1 and 50”)

IF nitrate > 10 THEN

PRINT(“Dose 3ml”)

ELSEIF nitrate > 2.5 THEN

PRINT(“Dose 2ml”)

ELSEIF nitrate > 1 THEN

PRINT(“Dose 1ml”)

ELSE

PRINT(“Dose 0.5ml”)

ENDIF

ENDIF

ENDIF

YES

NO

Start

Enter the nitrate
level: a number
between 1 and 50

Output “Dose

0.5ml”

Stop

Is nitrate
above 10?

Is nitrate
above 2.5?

Is nitrate
above 1?

Output “Dose

1ml”

Output “Dose

2ml”

Output “Dose

3ml”

YES

YES

NO

NO

52

media

OCR H046/H466

SLR6 Software development | Algorithms

Flowcharts

//Program to output the carbon source dose

Nitrate = INPUT(“Enter the nitrate level:

a number between 1 and 50”)

IF nitrate > 10 THEN

PRINT(“Dose 3ml”)

ELSEIF nitrate > 2.5 THEN

PRINT(“Dose 2ml”)

ELSEIF nitrate > 1 THEN

PRINT(“Dose 1ml”)

ELSE

PRINT(“Dose 0.5ml”)

ENDIF

ENDIF

ENDIF

YES

NO

Start

Enter the nitrate
level: a number
between 1 and 50

Output “Dose

0.5ml”

Stop

Is nitrate
above 10?

Is nitrate
above 2.5?

Is nitrate
above 1?

Output “Dose

1ml”

Output “Dose

2ml”

Output “Dose

3ml”

YES

YES

NO

NO

53

media
media

OCR H046/H466

SLR6 Software development | Algorithms

Flowcharts

//Program to output the carbon source dose

Nitrate = INPUT(“Enter the nitrate level:

a number between 1 and 50”)

IF nitrate > 10 THEN

PRINT(“Dose 3ml”)

ELSEIF nitrate > 2.5 THEN

PRINT(“Dose 2ml”)

ELSEIF nitrate > 1 THEN

PRINT(“Dose 1ml”)

ELSE

PRINT(“Dose 0.5ml”)

ENDIF

ENDIF

ENDIF

YES

NO

Start

Enter the nitrate
level: a number
between 1 and 50

Output “Dose

0.5ml”

Stop

Is nitrate
above 10?

Is nitrate
above 2.5?

Is nitrate
above 1?

Output “Dose

1ml”

Output “Dose

2ml”

Output “Dose

3ml”

YES

YES

NO

NO

54

media

OCR H046/H466

SLR6 Software development | Algorithms

Terminal

Input/output

Process

Subroutine

Decision

Line

Flowcharts

55

Multiple Choice

Question image

when i is 3 what is the value of s?

1

0

2

2

3

6

4

12

56

Multiple Choice

Question image

When s is displayed what is it's value

1

30

2

20

3

60

4

12

pattern-tertiary
media

OCR AS Level

(H046)

OCR A Level

(H446)

Teacher site: craigndave.org | Student site: student.craigndave.org | Smart revise: smartrevise.co.uk

SLR6 Software development

• Writing and following algorithms

Show answer

Auto Play

Slide 1 / 56

SLIDE