Para educadores: diapositivas de la lección, apuntes de repaso, diagramas listos para usar sobre Validation & Verification (Computer Science, CIE) — úsalos en tu lección, o presenta el tema como una actividad interactiva de clase que tus aprendices juegan como un juego en vivo.
Double entry asks for the same data twice and compares the two entries before accepting it.
Suitable Test Data Categories
Normal data: valid input that should be accepted (e.g., age 16 for range 12–18).
Abnormal data: invalid data type or value that should be rejected (e.g., 'H' for age).
Extreme data: boundary values that are still acceptable (e.g., 12 and 18).
Boundary data: the largest/smallest acceptable value and the corresponding smallest/largest rejected value, tested as a pair (e.g., 12 and 11, 18 and 19).
Normal, boundary and invalid test data check that a program handles each kind of input correctly.
Trace Tables
A trace table records the state of variables and outputs at each step of an algorithm.
Used to detect logic errors in flowcharts, pseudocode, or program code.
Each row corresponds to one step/iteration; columns for inputs, outputs, and variables.
Helps discover the purpose of an algorithm by showing intermediate results.
A trace table records one row per step: the input taken, the variable values, the decision made and any output.
Validation asks whether the data is sensible; verification asks whether it was copied or entered correctly.
Diapositivas
Sign up free to view the lesson slides
Step through every slide for this topic — plus flashcards and revision notes — with a free account.
Vista previa gratis — 8 de 58 preguntas. Regístrate para verlas todas.
1.What is the purpose of validation?
Easy
ATo check that data entered is sensible and meets program requirements
BTo check that data entered is exactly what was intended
CTo check that data is stored correctly in the database
DTo check that data is transmitted without errors
2.A program asks the user to enter a password. Which two validation checks would be most appropriate for a password field?
Medium
ALength check and presence check
BRange check and type check
CFormat check and check digit
DPresence check and range check
3.A program uses the following pseudocode to validate input:
REPEAT
INPUT Number
IF Number < 0 OR Number > 100 THEN
OUTPUT "Invalid"
ENDIF
UNTIL Number ≥ 0 AND Number ≤ 100
Which type of validation is being performed?
Easy
ARange check
BLength check
CType check
DPresence check
4.Which of the following is an example of verification?
Easy
ADouble entry checking
BRange check
CFormat check
DCheck digit
5.A website registration form asks users to enter their email address twice. This is an example of:
Easy
AVerification using double entry
BValidation using format check
CValidation using presence check
DVerification using visual check
6.An ISBN number ends with a check digit. What is the purpose of the check digit?
Easy
ATo help detect errors when the number is entered or transmitted
BTo ensure the number is in the correct format
CTo verify that the number belongs to a valid book
DTo encrypt the number for security
7.Which validation check would reject the input "ABC" for an age field?
Easy
AType check
BRange check
CLength check
DPresence check
8.A program checks that a username is not left blank. Which validation check is this?
Easy
APresence check
BLength check
CType check
DFormat check
Más preguntas
9.A programmer uses the following test data for a program that accepts ages between 12 and 18 inclusive: 11, 12, 15, 18, 19. Which test data values are boundary data?
Medium
A11, 12, 18, 19
B12, 18
C11, 19
D15
10.In a trace table, what is being recorded as the algorithm executes?
Easy
AThe values of variables and outputs at each step
BOnly the final output of the algorithm
CThe number of lines of code executed
DThe time taken for each instruction
11.The following pseudocode is used to input a number and check if it is between 5 and 10:
INPUT Number
IF Number ≥ 5 AND Number ≤ 10 THEN
OUTPUT "Valid"
ELSE
OUTPUT "Invalid"
ENDIF
Which test data set would provide the best coverage of normal, extreme, and boundary values?
Medium
A5, 7, 10, 4, 11
B5, 6, 9, 10
C4, 5, 10, 11
D6, 7, 8, 9
12.Which of the following is NOT a type of validation check?
Easy
ADouble entry check
BRange check
CFormat check
DCheck digit
13.A program asks the user to enter a date of birth in the format DD/MM/YYYY. Which validation check would be most appropriate to ensure the day is between 1 and 31?
Easy
ARange check
BLength check
CFormat check
DPresence check
14.A programmer uses the following pseudocode to validate an input:
INPUT X
IF X < 1 OR X > 100 THEN
OUTPUT "Invalid"
ENDIF
Which test data would be classified as boundary data?
Medium
A0, 100
B1, 100
C0, 101
D1, 101
15.Which of the following is an example of a verification check?
Easy
AChecking that a password contains at least 8 characters
BAsking a user to re-enter their email address
CChecking that an age is between 0 and 120
DChecking that a field is not left blank
16.A program uses the following pseudocode to validate a password:
INPUT Password
IF LENGTH(Password) < 8 THEN
OUTPUT "Too short"
ENDIF
Which validation check is being performed?
Easy
ARange check
BType check
CLength check
DPresence check
17.A check digit is calculated for a 12-digit barcode using a specific algorithm. The 13th digit is the check digit. What is the purpose of the check digit?
Easy
ATo ensure the barcode is unique
BTo detect if the barcode has been entered incorrectly
CTo encrypt the barcode data
DTo identify the country of origin
18.A program asks the user to enter their age. The program should accept ages between 13 and 19 inclusive. Which set of test data includes normal, boundary, and abnormal data?
Medium
A13, 19, 20
B15, 12, 20
C14, 13, "teen"
D16, 13, 19
19.Which validation check would reject an input of "ABC" for a field that expects a numeric value?
Easy
ARange check
BLength check
CType check
DFormat check
20.A program uses the following pseudocode to validate an input:
INPUT Code
IF LENGTH(Code) <> 6 THEN
OUTPUT "Invalid length"
ENDIF
IF SUBSTRING(Code, 1, 1) NOT IN "ABCDEFGHIJKLMNOPQRSTUVWXYZ" THEN
OUTPUT "Invalid first character"
ENDIF
Which validation check(s) are being performed?
Medium
ALength check only
BFormat check only
CLength check and format check
DPresence check and format check
21.A programmer is testing a program that accepts a score between 0 and 100. Which of the following is a valid set of test data that includes normal, extreme, and boundary values?
Medium
A50, 0, 100
B50, 0, 101
C50, 1, 100
D50, -1, 101
22.Which of the following is a method of verification?
Easy
ARange check
BDouble entry
CFormat check
DPresence check
23.A program uses the following trace table for input values: 5, 3, 8, 2. The algorithm finds the largest number. What is the value of 'Largest' after the third input (8)?
Medium
A5
B8
C3
D2
24.A program asks the user to enter a postcode. Which validation check would ensure that the postcode is entered in the correct format (e.g., two letters, one number, a space, one number, two letters)?
Easy
ALength check
BRange check
CFormat check
DPresence check
25.A programmer is testing a program that accepts a score between 0 and 100 inclusive. Which of the following sets of test data includes normal, extreme, and boundary values?
Hard
A50, 0, 100, -1, 101
B50, 0, 100, 1, 99
C50, 0, 100, 101, -1
D50, 0, 100, 1, 101
26.Which validation check would be used to ensure that a user has not left a field blank?
Easy
ARange check
BPresence check
CLength check
DFormat check
27.A program asks the user to enter a password. The password must be at least 8 characters long. Which validation check is being used?
Easy
ARange check
BType check
CLength check
DPresence check
28.A program uses the following pseudocode to validate an ID number in the format XX9999 (two uppercase letters followed by four digits). Which validation checks are being applied?
Medium
ALength check and format check
BLength check and range check
CFormat check and presence check
DType check and length check
29.A programmer writes a program that accepts a temperature in degrees Celsius. The valid range is -10 to 40 inclusive. Which of the following test values is an example of boundary data?
Medium
A-10
B0
C41
D20
30.A program uses the following pseudocode to validate an input:
INPUT Age
IF Age < 0 OR Age > 120 THEN
OUTPUT "Invalid age"
ENDIF
Which validation check is being performed?
Easy
ARange check
BType check
CLength check
DPresence check
31.What is the purpose of a check digit?
Easy
ATo ensure the data is the correct length
BTo detect errors when the code is entered or transmitted
CTo verify that the data has been entered twice correctly
DTo check that the data is of the correct data type
32.A program asks the user to enter a date in the format DD/MM/YYYY. Which validation check would be most appropriate to ensure that the day is between 1 and 31?
Easy
AFormat check
BRange check
CLength check
DType check
33.A program uses the following pseudocode to validate an input:
INPUT Code
IF LENGTH(Code) <> 6 THEN
OUTPUT "Invalid length"
ENDIF
Which validation check is being performed?
Easy
AFormat check
BLength check
CRange check
DPresence check
34.What is the difference between validation and verification?
Medium
AValidation checks data is accurate; verification checks data is sensible
BValidation checks data is sensible; verification checks data is accurate
CBoth check data is accurate
DBoth check data is sensible
35.Which of the following is a validation check that ensures a user has entered data into a field?
Easy
APresence check
BRange check
CLength check
DFormat check
36.A program asks the user to enter a password. The program checks that the password is at least 8 characters long. Which validation check is being used?
Easy
APresence check
BLength check
CType check
DRange check
37.A programmer is testing a program that accepts a score between 0 and 100 inclusive. Which of the following sets of test data includes normal, extreme, and boundary data?
Medium
A50, 0, 100, -1, 101
B50, 0, 100, 1, 99
C25, 75, 0, 100, 50
D0, 100, -1, 101, 50
38.A program uses the following pseudocode to validate an input:
INPUT Number
IF Number < 0 OR Number > 100 THEN
OUTPUT "Invalid"
ENDIF
Which validation check is being performed?
Easy
ALength check
BRange check
CType check
DPresence check
39.Which validation check would reject the input 'ABC' for a field that expects a numeric value?
Easy
ARange check
BLength check
CType check
DFormat check
40.A program asks the user to enter a date in the format DD/MM/YYYY. Which validation check would be most appropriate to ensure the day is between 1 and 31?
Easy
AFormat check
BRange check
CPresence check
DLength check
41.Which of the following best describes validation?
Medium
AAn automated process that checks if data is sensible and meets program requirements
BA manual process that checks data accuracy by comparing two entries
CA process that ensures data is entered correctly by the user
DA process that checks data is stored securely
42.Which validation check ensures that a field has not been left blank?
Easy
ALength check
BPresence check
CRange check
DType check
43.Verification checks that data is sensible and reasonable.
Easy
True or false?
44.Which of the following are methods of verification? (Select all that apply)
Medium
ADouble entry checking
BVisual checks
CRange check
DCheck digit
45.Match each validation check to its description.
Medium
Range check
Length check
Presence check
Checks if data falls within a specified interval
Checks the number of characters in a string
Checks that a field is not empty
46.Arrange the following steps in the correct order for a trace table walkthrough of an algorithm that finds the highest number from a list.
Medium
Record the initial state of variables
Input the first number and set it as highest
For each subsequent number, compare and update highest if larger
Output the highest number
47.Which of the following is a validation check that uses pattern matching to ensure data is entered in a specific layout?
Easy
AFormat check
BRange check
CLength check
DType check
48.Match each validation check to its correct description.
Medium
Range check
Presence check
Format check
Checks data follows a specific pattern
Checks data is within specified limits
Checks a field has not been left blank
49.Arrange the following steps in the correct order for a double entry verification process.
Medium
Compare the two entries
Prompt user to enter data again
Enter data the first time
Enter data the second time
Display error message if mismatch
50.Which of the following are types of validation checks? (Select all that apply)
Medium
ARange check
BDouble entry check
CPresence check
DVisual check
EFormat check
51.A program accepts ages between 12 and 18 inclusive. What is the extreme minimum value that should be accepted?
Easy
52.Complete the sentence: A check digit is a numerical value that is the ___ digit of a larger code, calculated by applying an algorithm.
Easy
A check digit is a numerical value that is the ____ digit of a larger code, calculated by applying an algorithm.
53.State one example of abnormal test data for a program that accepts a user's age as an integer.
Medium
54.For a program that accepts ages between 12 and 18 inclusive, what is the boundary value just below the minimum acceptable age?
Easy
55.Complete the sentence about verification.
Medium
Verification checks that the data entered is the ____ as the data that was intended to be entered. Two methods are double entry and ____ checks.
56.Describe the purpose of a trace table and how it is used to test an algorithm.
Hard
57.A program accepts ages between 12 and 18 inclusive. What is the extreme minimum value that should be accepted?
Easy
A13
B11
C14
D12
58.For a program that accepts ages between 12 and 18 inclusive, what is the boundary value just below the minimum acceptable age?
Easy
A10
B13
C12
D11
Unlock all 58 questions & more
Crea una cuenta gratis para ver todas las preguntas, las diapositivas, las tarjetas y los apuntes de repaso de este tema.