Past Paper 2 Questions
Past Paper 2 Questions
1.) Programs can perform validation and verification checks when data is entered.
(a) Give the names of two different validation checks and state the purpose of each one.
Check 1 ..............................................................................................................................................
Purpose .............................................................................................................................................
...........................................................................................................................................................
………...................................................................................................................................................
Check 2 ..............................................................................................................................................
Purpose .............................................................................................................................................
...........................................................................................................................................................
………...................................................................................................................................................
……………………………………………………………………………………………………………………………………………………
...........................................................................................................................................................
………...................................................................................................................................................
...........................................................................................................................................................
………...................................................................................................................................................
2.) Most programming languages include basic data types. Ahmad is describing the basic data types he
has used.
State the data type that Ahmad is describing in each sentence.
Choose the data type from this list of programming terms.
Array Boolean Char Constant Function Integer
Iteration Procedure Real String Variable
A number with a fractional part that can be positive or negative and used in calculations
Data type ..........................................................................................................................................
A whole number that can be positive, negative or zero and used in calculations
Data type ..........................................................................................................................................
A sequence of characters
Data type ..........................................................................................................................................
3.) Arrays are data structures used in programming. Explain what is meant by the terms dimension and
index in an array. Use examples of arrays in your explanations
Dimension
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
Index
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
4.) Four programming concepts and five descriptions are shown.
Draw a line to connect each Programming concept to its correct Description. Not all Descriptions will be
connected to a Programming concept.
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
6.) Tick (√) one box in each row to identify if the statement is about validation, verification or neither.
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
(b) Explain how indexing could be used to search for a value stored in a one-dimensional array
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
8.) Draw a line to connect each programming concept to the most appropriate description.
9.) Describe the use of verification on input of data when entering a list of items in stock into a database.
Explain why verification is necessary.
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
10.) Describe one type of test data that must be used to test if a program accepts valid input data.
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
11.) Four descriptions of stages in the program development life cycle are shown.
Draw one line to link each description to its most appropriate program development life cycle stage.
Not all program development life cycle stages will be used
12.) State three different features of a high-level programming language that a programmer could use to
make sure that their program will be easier to understand by another programmer.
Give an example for each feature.
Feature 1 …………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………………………….
Example ……………………………………………………………………………………………………………..……………………………………
………………………………………………………………………………………………………………………………………………………………….
Feature 2 …………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………………………….
Example ……………………………………………………………………………………………………………..……………………………………
………………………………………………………………………………………………………………………………………………………………….
Feature 3 …………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………………………….
Example ……………………………………………………………………………………………………………..……………………………………
………………………………………………………………………………………………………………………………………………………………….
13.) Explain why a programmer would use procedures and parameters when writing a program.
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
………………………………………………………………………………………………………………………………………………………………….
14.) Tick (3) one box to show which library routine returns the remainder of a division
Mark Scheme
1.a) Check: Range, Length, Type, Check Digit
Purpose:
- To make sure the data entered falls within a specific set of values.
- To make sure the data entered is not longer than specified.
- To make sure the data entered follows rules related to whether it is numbers or letters.
- To make sure an identification code entered is genuine or possible
1.c) Validation checks if the data entered is possible/it cannot check if data has been entered correctly.
Verification checks if the data entered matches the data submitted for entry/ it does not check if data
matches set criteria.
4.)
5.a)
FOR Count 1 TO 20
dataArray[Count] = 0
endloop
6)
7.b) using a counter to index the array so that the same code can be repeatedly used to check every
element in the array.
8.)
9.) verification is used to make sure the items are accurately copied
types: double entry, visual check
entering data twice to ensure no errors have occurred, human-eye checking of data to ensure its copied
accurately
11.)
14.) B