Question 1 of 3Difficulty ●●●●●
A bowling alley gives every booking a lane code made of one digit, a hyphen and then two capital letters, for example 7-QB.
Which validation check makes sure that a lane code typed in follows this pattern?
GCSE Computer Science practice questions on standard methods, validation and testing. Try 3 for free below — with hints, the answer and why the wrong answers are tempting. GCSE Beast has 22 questions on this topic.
A bowling alley gives every booking a lane code made of one digit, a hyphen and then two capital letters, for example 7-QB.
Which validation check makes sure that a lane code typed in follows this pattern?
A reaction-time game records how long a player takes to hit a target. It accepts a time in whole seconds from 1 to 30 inclusive.
A tester wants to use boundary data to test the upper limit. Which pair of values should be used?
A gaming leaderboard stores five scores in the array Points[1:5]:
| Points[1] | Points[2] | Points[3] | Points[4] | Points[5] |
|---|---|---|---|---|
| 30 | 41 | 25 | 38 | 12 |
This algorithm sorts them:
Last ← 5Passes ← 0REPEAT Swapped ← FALSE Passes ← Passes + 1 FOR Index ← 1 TO Last - 1 IF Points[Index] < Points[Index + 1] THEN Temp ← Points[Index] Points[Index] ← Points[Index + 1] Points[Index + 1] ← Temp Swapped ← TRUE ENDIF NEXT Index Last ← Last - 1UNTIL Swapped = FALSE OR Last = 1OUTPUT PassesWhat is output?