Back to 课程

Computer Science GCES OCR

0% Complete
0/0 Steps
  1. Cpu Architecture Performance And Embedded Systems Ocr
    5 主题
  2. Primary And Secondary Storage Ocr
    6 主题
  3. Data Storage And Compression Ocr
    12 主题
  4. Networks And Topologies Ocr
    6 主题
  5. Wired And Wireless Networks Protocols And Layers Ocr
    6 主题
  6. Identifying And Preventing Threats To Computer Systems And Networks Ocr
    2 主题
  7. Operating Systems And Utility Software Ocr
    2 主题
  8. Ethical Legal Cultural And Environmental Impact Ocr
    2 主题
  9. Computational Thinking Searching And Sorting Algorithms Ocr
    3 主题
  10. Designing Creating And Refining Algorithms Ocr
    5 主题
  11. Programming Fundamentals And Data Types Ocr
    5 主题
  12. Additional Programming Techniques Ocr
    7 主题
  13. Defensive Design And Testing Ocr
    6 主题
  14. Boolean Logic Diagrams Ocr
    2 主题
  15. Programming Languages And Integrated Development Environments Ides Ocr
    3 主题
  16. The Exam Papers Ocr
    2 主题
  17. Structuring Your Responses Ocr
    3 主题
课 Progress
0% Complete

Exam code:J277

  • When designing algorithms there are two main tools that can be used to describe them:

    • Pseudocode

    • Flowcharts

Examiner Tips and Tricks

Remember, in the exam you will be expected to create, interpret, correct and refine algorithms in either flowcharts, pseudocode or OCR exam reference language

Pseudocode

What is pseudocode?

  • Pseudocode is a text based tool that uses short English words/statements to describe an algorithm

  • Pseudocode is more structured than writing sentences in English, but is very flexible

Example

  • A casino would like a program that asks users to enter an age, if they are 18 or over they can enter the site, if not then they are given a suitable message

Pseudocode

INPUT age

IF age >= 18 THEN

OUTPUT "Welcome to the site"

ELSE

OUTPUT "Sorry, this site is for users 18 and over"

END IF

  • The casino would like the algorithm refined so that the user also enter their first name and this is used to greet the user when they access the site

Pseudocode

INPUT fname

INPUT age

IF age >= 18 THEN

OUTPUT ("Welcome to the site", fname)

ELSE

OUTPUT "Sorry, this site is for users 18 and over"

END IF

What is OCR exam reference language?

  • OCR exam reference language is the officially designed pseudocode that is seen in OCR based exams to describe algorithms

  • Pseudocode has no official syntax so to keep exams consistent OCR have developed their own

Examples

Function

OCR exam reference language

OUTPUT

print("Hello")

INPUT

num = input("Enter a number")

SELECTION

if num == 2 then

...

elseif num < 4 then

...

endif

FOR LOOPS

for i = 1 to 10

...

next i

WHILE LOOPS

while (i != 11)

...

endwhile

Examiner Tips and Tricks

OCR exam reference language is so close to Python syntax that you can write algorithms in Python in both section A and B of the exam!

Worked Example

flow-chart-question

Rewrite the flowchart as a pseudocode [4]
You must use either

  • Pseudocode or

  • OCR Exam Reference Language

Answer

Pseudocode

OCR exam reference language

INPUT price

IF price < 50 THEN

OUTPUT "Great choice!"

ELSE

OUTPUT "Way too expensive"

END IF

price = input("Enter price")

if price < 50 then

print("Great choice!")

else

print("Way too expensive")

end if

Flowcharts

What is a flowchart?

  • Flowcharts are a visual tool that uses shapes to represent different functions to describe an algorithm

  • Flowcharts show the data that is input and output, the processes that take place and any decisions or repetition

  • Lines are used to show the flow of control

flow-chart-symbols

Example

Flowchart

flow-chart-1
  • The casino would like the algorithm refined so that the user also enter their first name and this is used to greet the user when they access the site

Flowchart

flow-chart-2-1

Responses

您的邮箱地址不会被公开。 必填项已用 * 标注