A range check is used to check that a value input is above 10 and below 20.
Tick (✓) one box to show which value would be accepted.
10
15
20
30
Did this page help you?
A range check is used to check that a value input is above 10 and below 20.
Tick (✓) one box to show which value would be accepted.
10
15
20
30
Did this page help you?
Verification checks can be made on input data.
Tick (✓) one box to show which check is a verification check on input data.
checksum
double entry check
echo check
parity check
Did this page help you?
Tick (✓) one box in each row to identify if the statement is about validation, verification or both.
Statement | Validation | Verification | Both |
---|---|---|---|
Entering the data twice to check if both entries are |
|
|
|
Automatically checking that only numeric data has |
|
|
|
Checking data entered into a computer system |
|
|
|
Visually checking that no errors have been |
|
|
|
Did this page help you?
Describe the purpose of validation and verification checks during data entry.
Include an example for each.
Did this page help you?
A programmer has written an algorithm to check that prices are less than $10.00
These values are used as test data:
10.00 9.99 ten
State why each value was chosen as test data.
10.00 .........................................................................
9.99 ............................................................................
ten ...............................................................................
Did this page help you?
A program checks if the weight of a baby is at least 2 kilograms.
Give, with reasons, two different values of test data that could be used for the baby’s weight. Each reason must be different.
Did this page help you?
Give one piece of normal test data and one piece of erroneous test data that could be used to validate the input of an email address.
State the reason for your choice in each case.
Did this page help you?
An algorithm allows a user to input their password and checks that there are at least eight characters in the password. Then, the user is asked to re-input the password to check that both inputs are the same. The user is allowed three attempts at inputting a password of the correct length and a matching pair of passwords. The pre-defined function LEN(X) returns the number of characters in the string, X
01 Attempt ← 0
02 REPEAT
03 PassCheck ← TRUE
04 OUTPUT "Please enter your password "
05 INPUT Password
06 IF LEN(Password) < 8
07 THEN
08 PassCheck ← TRUE
09 ELSE
10 OUTPUT "Please re-enter your password "
11 INPUT Password2
12 IF Password <> Password
13 THEN
14 PassCheck ← FALSE
15 ENDIF
16 ENDIF
17 Attempt ← Attempt + 1
18 UNTIL PassCheck OR Attempt <> 3
19 IF PassCheck
20 THEN
21 OUTPUT "Password success"
22 ELSE
23 OUTPUT "Password fail"
24 ENDIF
Give two sets of test data for this algorithm and a reason for choosing each set.
Each set of test data and its reason must be different.
Did this page help you?
Describe what is meant by data validation
Did this page help you?
A validation check is used to make sure that any value that is input is an integer between 30 and 200 inclusive.
Give one example of each type of test data to check that the validation check is working as intended. Each example of test data must be different.
Give a reason for each of your choices of test data.
Normal test data
Abnormal test data
Extreme test data
Did this page help you?
A program needs to make sure the value input for a measurement meets the following rules:
the value is a positive number
a value is always input
the value is less than 1000
Describe the validation checks that the programmer would need to use.
The program needs editing to include a double entry check for the value input
State why this check needs to be included.
Did this page help you?
This flowchart represents an algorithm.
The array Name[1:4] used in the flowchart contains the following data:
|
|
|
|
---|---|---|---|
|
|
|
|
Complete the trace table using the data given in the array
|
|
|
|
|
|
|
---|---|---|---|---|---|---|
|
|
|
| |||
Did this page help you?
This flowchart inputs the weight of items, in kilograms, to be loaded on a trailer. Any item over 25 kilograms is rejected. The trailer can take up to 100 kilograms.
Complete the trace table for the input data:
13, 17, 26, 25, 5, 10, 15, 35, 20, 15
Weight | Reject | TotalWeight | OUTPUT |
---|---|---|---|
Did this page help you?
The pseudocode represents an algorithm.
The pre-defined function DIV
gives the value of the result of integer division. For example, Y = 9 DIV 4
gives the value Y = 2
The pre-defined function MOD
gives the value of the remainder of integer division. For example, R = 9 MOD 4
gives the value R = 1
First ← 0
Last ← 0
INPUT Limit
FOR Counter ← 1 TO Limit
INPUT Value
IF Value >= 100
THEN
IF Value < 1000
THEN
First ← Value DIV 100
Last ← Value MOD 10
IF First = Last
THEN
OUTPUT Value
ENDIF
ENDIF
ENDIF
NEXT Counter
Complete the trace table for the algorithm using this input data:
8, 66, 606, 6226, 8448, 642, 747, 77, 121
|
|
|
|
|
|
---|---|---|---|---|---|
Did this page help you?
An algorithm allows a user to input their password and checks that there are at least eight characters in the password. Then, the user is asked to re-input the password to check that both inputs are the same. The user is allowed three attempts at inputting a password of the correct length and a matching pair of passwords. The pre-defined function LEN(X) returns the number of characters in the string, X
01 Attempt ← 0
02 REPEAT
03 PassCheck ← TRUE
04 OUTPUT "Please enter your password "
05 INPUT Password
06 IF LEN(Password) < 8
07 THEN
08 PassCheck ← TRUE
09 ELSE
10 OUTPUT "Please re-enter your password "
11 INPUT Password2
12 IF Password <> Password
13 THEN
14 PassCheck ← FALSE
15 ENDIF
16 ENDIF
17 Attempt ← Attempt + 1
18 UNTIL PassCheck OR Attempt <> 3
19 IF PassCheck
20 THEN
21 OUTPUT "Password success"
22 ELSE
23 OUTPUT "Password fail"
24 ENDIF
The algorithm includes two types of check on the data input.
Identify and describe each type of check.
Did this page help you?
This algorithm checks the temperature of hot food being served to customers.
Complete the trace table for the algorithm using this input data:
75, 78, 84, 87, 91, 80, 75, 70, 65, 62, –1, 20
Counter | Hot | Cold | Serve | Temp | Error | OUTPUT |
---|---|---|---|---|---|---|
Did this page help you?
The flowchart represents an algorithm.
The table represents the two-dimensional (2D) array Word[] which stores the first half of the phonetic alphabet used for radio transmission. For example, Word[10,1] is ‘J’.
Index | 1 | 2 |
---|---|---|
1 | A | Alpha |
2 | B | Bravo |
3 | C | Charlie |
4 | D | Delta |
5 | E | Echo |
6 | F | Foxtrot |
7 | G | Golf |
8 | H | Hotel |
9 | I | India |
10 | J | Juliet |
11 | K | Kilo |
12 | L | Lima |
13 | M | Mike |
Complete the trace table for the algorithm by using the input data: F, Y, D, N
Pointer | Letter | Choice | OUTPUT |
---|---|---|---|
Did this page help you?
This flowchart represents an algorithm.
The array X[1:5] used in the flowchart contains this data:
X[1] | X[2] | X[3] | X[4] | X[5] |
---|---|---|---|---|
10 | 1 | 5 | 7 | 11 |
Complete the trace table by using the data given in the array.
F | C | X[1] | X[2] | X[3] | X[4] | X[5] | T |
---|---|---|---|---|---|---|---|
10 | 1 | 5 | 7 | 11 | |||
Did this page help you?