2210/02                                                  Cambridge O Level – Mark Scheme              For examination
SPECIMEN                                 from 2023
 Question                                                             Answer                                  Marks
    1(a)       One mark for each correct line.                                                                     4
                     Pseudocode description                                    Pseudocode statement
                                                                                      FOR…TO…NEXT
                   a loop that will always iterate at
                              least once
                                                                               IF…THEN…ELSE…ENDIF
                   a conditional statement to deal
                   with many possible outcomes
                                                                                   WHILE…DO…ENDWHILE
                 a loop that will always iterate a set
                          number of times
                                                                         CASE…OF…OTHERWISE…ENDCASE
                     a conditional statement with
                different outcomes for true and false
                                                                                     REPEAT…UNTIL
© UCLES 2020                                                        Page 4 of 16
2210/02                                                    Cambridge O Level – Mark Scheme                                        For examination
                                                                     SPECIMEN                                                           from 2023
 Question                                                                  Answer                                                         Marks
    1(b)       •   appropriate loop controls                                                                                                   3
               •   read from array
               •   output from array (the last two points can be in one statement, see example)
               Note: reading and the output MUST be within the same loop.
               For example:
               Count ← 0
               WHILE Count < 50 DO
                 OUTPUT Name[Count]
                 Count ← Count + 1
               ENDWHILE
 Question                                                                  Answer                                                         Marks
     2         Validation check                                                                                                                4
               One mark for description:
               •  To test if the data entered is possible / reasonable / sensible.
               •  A range check tests that data entered fits within specified values.
               One mark for example:
               •  Allow any correct validation check as an example (range, length, type, presence, format, etc.).
               Verification check
               One mark for description:
               •  To test if the data input is the same as the data that was intended to be input.
               •  A double entry check expects each item of data to be entered twice and compares both entries to check they are the
                  same.
               One mark for example:
               Allow any correct verification check as an example (visual, double entry, etc.).
© UCLES 2020                                                             Page 5 of 16
2210/02                                                  Cambridge O Level – Mark Scheme                        For examination
                                                                   SPECIMEN                                           from 2023
 Question                                                               Answer                                          Marks
     3         B                                                                                                             1
 Question                                                               Answer                                          Marks
     4         One mark for a hierarchical structure.                                                                        4
               One mark for suitable names for the sub-systems.
               One mark for identifiable inputs.
               One mark for identifiable outputs.
               For example:
                                                    Satellite navigation system
                               Input destination                                       Output directions
                New destination                Saved destination                     Map               List
 Question                                                               Answer                                          Marks
    5(a)       One mark for each error identified and correction:                                                            4
               •  Numbers should be Number
               •  IF Number > 100 should be IF Number >= 100
               •  INPUT Number is missing from inside the loop, insert INPUT Number after the ENDIF statement.
               •  The final OUTPUT Number is not needed, remove it.
    5(b)       One mark for both ends of the range and correct inequality symbols.                                           2
               One mark for the AND // nested IFs.
               The test should be IF Number >= 100 AND Number <= 200
© UCLES 2020                                                          Page 6 of 16
2210/02                                                   Cambridge O Level – Mark Scheme   For examination
                                                                    SPECIMEN                      from 2023
 Question                                                                 Answer                    Marks
    6(a)       One mark for each correct gate, with the correct input(s) as shown.                       4
               B                                                                         X
    6(b)                                                                                                 4
                   A       B        C       X
                   0       0        0        0
                   0       0        1        0
                   0       1        0        1
                   0       1        1        0
                   1       0        0        0
                   1       0        1        0
                   1       1        0        1
                   1       1        1        1
               Four marks for eight correct outputs.
               Three marks for six or seven correct outputs.
               Two marks for four or five correct outputs.
               One mark for two or three correct outputs.
© UCLES 2020                                                           Page 7 of 16
2210/02                                                     Cambridge O Level – Mark Scheme                           For examination
                                                                      SPECIMEN                                              from 2023
 Question                                                                    Answer                                           Marks
    7(a)           Flag      Count      Name[1]      Name[2]      Name[3]       Name[4]   Temp                                     5
                                          Jamal        Amir          Eve           Tara
                    0           1         Amir         Jamal         Eve           Tara   Jamal
                    1           2         Amir          Eve        Jamal           Tara   Jamal
                    1           3         Amir          Eve        Jamal           Tara   Jamal
                    1           4         Amir          Eve        Jamal           Tara   Jamal
                    0           1         Amir          Eve        Jamal           Tara   Jamal
                    0           2         Amir          Eve        Jamal           Tara   Jamal
                    0           3         Amir          Eve        Jamal           Tara   Jamal
                    0           4         Amir          Eve        Jamal           Tara   Jamal
               One mark for Flag column.
               One mark for Count column.
               One mark for Temp column.
               Two marks for all correct Name columns or one mark for two or three correct Name columns.
               Note: Repeated values do not need to be written unless a value is rewritten.
    7(b)       •    bubble sort / sorting the names                                                                                2
               •    ascending order / A to Z / lowest to highest / alphabetical order
 Question                                                                    Answer                                           Marks
     8         One mark for each.                                                                                                  3
               10.00 boundary / abnormal data // the price should be rejected // value is out of range
               9.99 boundary / extreme / normal data // the price should be accepted // value is within normal range
               ten   abnormal data // input should be rejected // value is wrong type
© UCLES 2020                                                               Page 8 of 16
2210/02                                                     Cambridge O Level – Mark Scheme          For examination
                                                                      SPECIMEN                             from 2023
 Question                                                                Answer                              Marks
     9         Any three from:                                                                                    3
               •   data is not lost when the computer is switched off // data is stored permanently
               •   data can be used by more than one program or reused when a program is run again
               •   data can be backed up or archived
               •   data can be transported from one place / system to another.
 Question                                                                Answer                              Marks
     10        C                                                                                                  1
 Question                                                                Answer                              Marks
   11(a)       20                                                                                                 1
  11(b)(i)     CatNo                                                                                              1
  11(b)(ii)    it is a unique identifier                                                                          1
   11(c)       Two marks for four correct answers.                                                                2
               One mark for two or three correct answers.
                    Field                  Data type
                CatNo            Text
                Title            Text
                Genre1           Text
                Streaming        Boolean / Text
   11(d)       FROM                                                                                               2
               "Comedy"
© UCLES 2020                                                           Page 9 of 16
2210/02                                                   Cambridge O Level – Mark Scheme   For examination
                                                                    SPECIMEN                      from 2023
 Question                                                                 Answer                    Marks
   12(a)       One mark for each correct line.                                                           3
               DECLARE X : STRING
               DECLARE Y : INTEGER
               DECLARE Z : INTEGER
   12(b)       One mark for storing string in X.                                                         6
               One mark for calling the function length.
               One mark for using the correct parameter X.
               One mark for using the substring function.
               One mark for correct parameters.
               One mark for outputting length and substring return values.
               For example:
               X ← "Programming is fun"
               OUTPUT LENGTH(X)
               Y ← 16
               Z ← 3
               OUTPUT SUBSTRING(X,Y,Z)
© UCLES 2020                                                           Page 10 of 16
2210/02                                                    Cambridge O Level – Mark Scheme                                              For examination
                                                                     SPECIMEN                                                                 from 2023
 Question                                                                  Answer                                                               Marks
     13        Read the whole answer, award a mark from both of the following tables and add up the total.                                          15
               Marks are available for:
               •   AO2 (maximum 9 marks)
               •   AO3 (maximum 6 marks).
               The techniques and the data structures required are listed below. The requirements may be met using a suitable built-in
               function from the programming language used (Python, VB.NET or Java).
               Techniques required:
               R1 Calculate total mark for each student (iteration and totalling).
               R2 Calculate average mark for each student rounded to the nearest whole number.
               R3 Selection of grade for each student (selection).
               R4 Output for each student name, total mark, average mark, grade awarded (output with appropriate messages).
               R5	Calculate, store and output the number of distinctions, merits, passes and fails for the whole class (iteration,
                   counting and output with appropriate messages).
               Data structures required:
               The names underlined must be used as provided in the scenario.
               Arrays or lists StudentName, StudentMark,
               			 (TotalMark and AverageMark may be seen but no requirement to store)
               Variables		 ClassSize, SubjectNo, SubjectCounter, StudentCounter
               			 DistinctionNo, MeritNo, PassNo, FailNo could be an array or list
               Constants      Distinction, Merit, Pass could be variables
© UCLES 2020                                                            Page 11 of 16
2210/02                                            Cambridge O Level – Mark Scheme                      For examination
                                                             SPECIMEN                                         from 2023
 Question                                                        Answer                                         Marks
     13        Example 15 mark answer in pseudocode.
               // meaningful identifier names and appropriate data structures (variables, constants and the
               // given arrays) to store all the data required
               DECLARE TotalMark : ARRAY[1:50] OF INTEGER
               DECLARE AverageMark : ARRAY[1:50] OF INTEGER
               DECLARE SubjectCounter : INTEGER
               DECLARE StudentCounter : INTEGER
               DECLARE DistinctionNo : INTEGER
               DECLARE MeritNo : INTEGER
               DECLARE PassNo : INTEGER
               DECLARE FailNo : INTEGER
               CONSTANT Distinction = 70
               CONSTANT Merit = 55
               CONSTANT Pass = 40
               // initialisation processes for this scenario, initialising the running totals used for
               // grades and combined totals
               DistinctionNo ← 0
               MeritNo ← 0
               PassNo ← 0
               FailNo ← 0
               FOR StudentCounter ← 1 to ClassSize
                 TotalMark[StudentCounter] ← 0
               NEXT StudentCounter
               // programming techniques of iteration, selection, totalling, counting and output are used
© UCLES 2020                                                  Page 12 of 16
2210/02                                              Cambridge O Level – Mark Scheme                    For examination
                                                               SPECIMEN                                       from 2023
 Question                                                          Answer                                       Marks
     13        FOR StudentCounter ← 1 to ClassSize
                 FOR SubjectCounter ← 1 to SubjectNo
                   TotalMark[StudentCounter] ← TotalMark[StudentCounter] + StudentMark[StudentCounter,
                     SubjectCounter]
                 NEXT SubjectCounter
                 AverageMark[StudentCounter] ← INT((TotalMark[StudentCounter] / SubjectNo) + 0.5)
                 OUTPUT "Name ", StudentName[StudentCounter]
                 OUTPUT "Combined total mark ", TotalMark[StudentCounter]
                 OUTPUT "Average mark ", AverageMark[StudentCounter]
                 IF AverageMark[StudentCounter] >= Distinction
                   THEN
                     DistinctionNo ← DistinctionNo + 1
                     OUTPUT "Grade Distinction"
                   ELSE
                     IF AverageMark[StudentCounter] >= Merit
                        THEN
                          MeritNo ← MeritNo + 1
                          OUTPUT "Grade Merit"
                        ELSE
                          IF AverageMark[StudentCounter] >= Pass
                             THEN
                               PassNo ← PassNo + 1
                               OUTPUT "Grade Pass"
                             ELSE
                               FailNo ← FailNo + 1
                               OUTPUT "Grade Fail"
                          ENDIF
                     ENDIF
                 ENDIF
               NEXT StudentCounter
               OUTPUT   "Number   of   Distinctions ", DistinctionNo
               OUTPUT   "Number   of   Merits ", MeritNo
               OUTPUT   "Number   of   Passes ", PassNo
               OUTPUT   "Number   of   Fails ", FailNo
© UCLES 2020                                                    Page 13 of 16
2210/02                                                   Cambridge O Level – Mark Scheme                                          For examination
                                                                    SPECIMEN                                                             from 2023
 AO2: A
       pply knowledge and understanding of the principles and concepts of computer science to a given context, including the analysis
      and design of computational or programming problems
               0                            1–3                                       4–6                                     7–9
                          At least one programming technique        Some programming techniques used        The range of programming techniques
                          has been used.                            are appropriate to the problem.         used is appropriate to the problem.
                          Any use of selection, iteration,          More than one technique seen applied    All criteria stated for the scenario
                          counting, totalling, input and output.    to the scenario, refer to the list of   have been covered by the use of
                                                                    techniques needed.                      appropriate programming techniques,
                                                                                                            refer to the list of techniques needed.
 No creditable response
                          Some data has been stored but not         Some of the data structures chosen      The data structures chosen are
                          appropriately.                            are appropriate and store some of the   appropriate and store all the data
                                                                    data required.                          required.
                          Any use of variables or arrays or other
                          language-dependent data structures,       More than one data structure used       The data structures used store all the
                          e.g. Python lists.                        to store data that is required by the   data that is required by the scenario.
                                                                    scenario.
© UCLES 2020                                                         Page 14 of 16
2210/02                                                  Cambridge O Level – Mark Scheme                                           For examination
                                                                   SPECIMEN                                                              from 2023
 AO3: Provide solutions to problems by:
      •   evaluating computer systems
      •   making reasoned judgements
      •   presenting conclusions
               0                             1–2                                     3–4                                     5–6
                          Program seen without relevant            Program seen with some relevant         The program has been fully
                          comments.                                comment(s).                             commented.
                          Some identifier names used are           The majority of identifiers used are    Suitable identifiers with names
                          appropriate.                             appropriately named.                    meaningful to their purpose have been
                                                                                                           used throughout.
                          Some of the data structures used have    Most of the data structures used have
                          meaningful names.                        meaningful names.                       All the data structures used have
                                                                                                           meaningful names.
                          The solution is illogical.               The solution contains parts that may    The program is in a logical order.
                                                                   be illogical.
                          The solution is inaccurate in many       The solution contains parts that are    The solution is accurate.
 No creditable response
                          places.                                  inaccurate.
                                                                                                           Solution logically performs all the tasks
                          Solution contains few lines of code,     Solution contains lines of code, with   given in the scenario. Ignore minor
                          with errors, that attempt to perform a   some errors, that logically perform     syntax errors.
                          task given in the scenario.              tasks given in the scenario. Ignore
                                                                   minor syntax errors.
                          The solution attempts at least one of    The solution meets most of the          The solution meets all the
                          the requirements.                        requirements.                           requirements given in the question.
                          Solution contains lines of code that     Solution contains lines of code that    Solution performs all the tasks given in
                          attempt at least one task given in the   perform most tasks given in the         the scenario.
                          scenario.                                scenario.
© UCLES 2020                                                        Page 15 of 16