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.
- (a)Describe the validation checks that the programmer would need to use.[3]
- (b)(i)State why this check needs to be included.[1]
- (b)(ii)The input value needs to be stored in the variable Measurement Write pseudocode to perform the double entry check until a successful input is made.[3]
Mark scheme
Marking points from the official mark scheme (May/June 2023). The mark or mark type is shown in brackets.
- [3] One mark for each point (max three). • range check with acceptable values is (greater than) zero and less than 1000 • presence check to ensure the program will not continue until a value has been entered • type/character check to ensure that a number is entered • length check to ensure there are no more than 3 digits entered
- [1] To verify the data / for verification / as a verification check // to make sure that no changes are made to the data on entry
- [3] One mark for each point (max three). • use of iteration • use of two inputs • to check that the two inputs are the same / different • use of the given variable Measurement For example REPEAT OUTPUT "Please enter measurement " INPUT Measurement OUTPUT "Please re-enter measurement " INPUT MeasurementCheck UNTIL Measurement = MeasurementCheck
Write your answer and get it marked
On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.
Sign up free →