AQA GCSE COMPUTER SCIENCE 8525Paper 1 Computational thinking and programming skills
An algorithm, that uses the modulus operator, has been represented using pseudo-code in Figure 1. • Line numbers are included but are not part of the algorithm. Figure 1 1 i USERINPUT 2 IF i MOD 2 = 0 THEN 3 OUTPUT i * i 4 ELSE 5 OUTPUT i 6 ENDIF The modulus operator is used to calculate the remainder after dividing one integer by another. For example: • 14 MOD 3 evaluates to 2 • 24 MOD 5 evaluates to 4 . Shade one lozenge that shows the line number where selection is first used in the algorithm in Figure 1. [1 mark] A Line number 1 B Line number 2 C Line number 3 D Line number 4
Written for
- Institution
- Computers
- Course
- Computers
Document information
- Uploaded on
- May 8, 2024
- Number of pages
- 41
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
aqa gcse computer science 8525paper 1 computationa