Exam-style practice
Topic-by-topic past-paper questions, marked against the official mark schemes.
Build a rock-solid understanding of how computers work and learn to solve problems with algorithms and pseudocode, with the past-paper practice you need for a top grade.
Every syllabus topic, taught clearly and practised with exam-style questions.
Personal, live online lessons built around your syllabus and your goals.
Topic-by-topic past-paper questions, marked against the official mark schemes.
Step-by-step practice writing, tracing and correcting algorithms for Paper 2.
Mindmaps, infographics and flashcards for quick, effective revision.
Free notes, revision resources and practice for this course.
Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Questions in the Paper 2 style. Try each one first, then open the answer. For precise notes on each topic with practice after it, use the coding roadmap. For more questions to code and run, use Coding practice.
A teacher needs a program to record the details of a student.
Write pseudocode to:
Total: 7 marks
The radius of a circle can be found from its circumference using the formula: radius = circumference ÷ (2 × Pi).
Write pseudocode to:
Give one reason why Pi is stored as a constant and not as a variable.
Total: 6 marks
(b) The value does not change while the program runs, so it cannot be changed by accident. (Or: the value only needs to be edited in one place.)
Loading…Open fileA program is needed to produce a marksheet.
Suggest a suitable identifier and the most appropriate data type for each of these items of data:
Write pseudocode to:
Total: 8 marks
(a) StudentName : STRING. StudentMarks : INTEGER. Grade : CHAR. Percentage : REAL. PassOrFail : BOOLEAN.
Loading…Open fileA membership program offers its user three options.
Write pseudocode to output a heading that asks the user to enter their choice, followed by these options on separate lines:
Total: 4 marks
A menu has three options, numbered 1, 2 and 3. The user's choice must be validated.
Write pseudocode to:
State the name of this type of validation check.
Total: 7 marks
The user's menu choice must be a value from 1 to 3 inclusive.
Write pseudocode to input Choice, with a suitable prompt, and use a WHILE loop to ask the user to re-enter the value until it is in range.
State one difference between a WHILE loop and a REPEAT...UNTIL loop.
Give one item of normal test data, one item of abnormal test data and one item of extreme test data for this validation check.
Total: 8 marks
(b) A WHILE loop tests its condition at the start, so its statements may never run. A REPEAT...UNTIL loop tests at the end, so its statements run at least once.
(c) Normal: 2. Abnormal: any value out of range, such as 7 or -1. Extreme: 1 or 3.
Loading…Open fileA program only continues when the correct password, abc, has been entered.
Write pseudocode to input Password, with a suitable prompt, and use a WHILE loop to ask the user to re-enter it until it is correct.
State the meaning of the operator <>
Total: 5 marks
The area of a circle is found using the formula: area = Pi × radius².
Write pseudocode to:
State the area that is calculated.
Total: 6 marks
This pseudocode algorithm inputs a positive whole number. It should output how many multiples of that number are less than or equal to 100.
01 DECLAR Count : INTEGER 02 DECLARE Number,Value : INTEGER 03 Count ← 0 04 INPUT Number 05 Value ← Count * Number 06 WHILE Value <= 100 DO 07 Count ← Count + 1 08 Value ← Count * Number 09 ENDWHIL 10 Count ← Count - 1 11 OUTPUT Count
Identify the line number of each of the two errors in the pseudocode and suggest a correction for each error.
State the output of the corrected algorithm when the input is 30.
Explain what happens when the input is 0.
Total: 5 marks
(a) Line 01: DECLAR should be DECLARE. Line 09: ENDWHIL should be ENDWHILE.
(b) 3
(c) Value stays at 0, so the condition Value <= 100 is always true and the loop never ends.
The first character of a string is in position 1.
State the output of each of these statements:
The variable Text stores the string "Computer Science Class". Write pseudocode to use a FOR loop to output each character of Text on a separate line. You must use the library routines LENGTH and SUBSTRING.
Total: 8 marks
Book a free 15-minute intro call. We'll talk about your goals and make a plan together.
Book a free intro call