Paper 2 Question 1
PAPER 2 : QUESTION 1
either a simple input/process/output problem where every correction or new line required has
its own separate comment telling you what to do
or a pre-written problem where you write no code but identify aspects of the code by writing
your answers to the right of existing comments
>> Peter Dring blog with code Q1 style three practice problems
Example of type 1 snippet:
# -------------------------------------------------------------------
# Import libraries
# -------------------------------------------------------------------
# =====> Import the math library
# -------------------------------------------------------------------
# Global variables
# -------------------------------------------------------------------
# =====> Create an integer variable named radius and set it to 0
# =====> Create a real variable named circumference and set it to 0.0
# -------------------------------------------------------------------
# Main program
# -------------------------------------------------------------------
# =====> Complete the line to assign an integer, input by # the user, to the variable radius
radius =
...
Example of type 2 snippet:
# Give the name of a parameter #
# Give the symbol used to show assignment #
# Give the name of a structured data type implemented as a list #
# Give the name of a built-in subprogram #
# Give the name of a user-devised function #
# Give the name of a constant #
# Give the name of a local variable #
# Name of an array used in the program #
# Line number of an initialisation of a variable with a real number #
# Line numbers for a selection construct #
# Line number(s) for a repetition construct #
# Line number(s) for an iteration construct #
PAPER 2 : QUESTION 1
either a simple input/process/output problem where every correction or new line required has
its own separate comment telling you what to do
or a pre-written problem where you write no code but identify aspects of the code by writing
your answers to the right of existing comments
>> Peter Dring blog with code Q1 style three practice problems
Example of type 1 snippet:
# -------------------------------------------------------------------
# Import libraries
# -------------------------------------------------------------------
# =====> Import the math library
# -------------------------------------------------------------------
# Global variables
# -------------------------------------------------------------------
# =====> Create an integer variable named radius and set it to 0
# =====> Create a real variable named circumference and set it to 0.0
# -------------------------------------------------------------------
# Main program
# -------------------------------------------------------------------
# =====> Complete the line to assign an integer, input by # the user, to the variable radius
radius =
...
Example of type 2 snippet:
# Give the name of a parameter #
# Give the symbol used to show assignment #
# Give the name of a structured data type implemented as a list #
# Give the name of a built-in subprogram #
# Give the name of a user-devised function #
# Give the name of a constant #
# Give the name of a local variable #
# Name of an array used in the program #
# Line number of an initialisation of a variable with a real number #
# Line numbers for a selection construct #
# Line number(s) for a repetition construct #
# Line number(s) for an iteration construct #