
































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

































1. What is the main purpose of an algorithm in computer science? A. To store permanent information on a computer B. To provide a finite sequence of steps for solving a problem C. To increase the physical memory of a computer D. To replace the operating system Answer: B Rationale: An algorithm is a logical sequence of instructions designed to solve a problem or complete a task. 2. A programmer breaks a large problem into smaller, manageable parts. Which com- putational thinking technique is being used? A. Abstraction B. Encryption C. Decomposition D. Compilation Answer: C Rationale: Decomposition involves dividing a complex problem into smaller components that can be solved independently. 3. A programmer is designing a school attendance system. They decide to ignore the colour of students' shoes because it is irrelevant to recording attendance. Which technique is being used?
A. Abstraction B. Iteration C. Validation D. Sequencing Answer: A Rationale: Abstraction removes irrelevant details and concentrates on the information necessary to solve the problem.
4. Which statement best describes pattern recognition in computational thinking? A. Converting source code into machine code B. Identifying similarities or repeated characteristics in problems C. Removing unnecessary data from a database D. Testing a program using random inputs only Answer: B Rationale: Pattern recognition helps identify common features that can be used to de- velop reusable solutions. 5. A programmer writes instructions that must execute in a specific order. Which com- putational concept is most directly involved? A. Sequencing B. Authentication C. Compression D. Encryption Answer: A 6. Which characteristic makes an algorithm effective? A. It must contain an infinite number of instructions B. It must use the largest possible amount of memory C. It must always be written in a particular programming language D. It must clearly specify steps that eventually solve the problem Answer: D Rationale: A properly designed algorithm must be clear, logically ordered, and capable of terminating with a solution.
A. An algorithm that stores unlimited data B. An algorithm that eventually terminates C. An algorithm that uses only loops D. An algorithm that cannot receive input Answer: B
12. A program calculates the average mark of five students. Which set of stages best represents the IPO model? A. Input marks, add and divide them, output average B. Output marks, delete values, input average C. Process average, input results, remove output D. Input average, print marks, process nothing Answer: A 13. Which statement about algorithms is correct? A. Algorithms can only be written in Python B. Algorithms must always contain a loop C. Algorithms can be represented using pseudocode or flowcharts D. Algorithms are always stored as executable files Answer: C 14. A developer is creating a program to calculate delivery costs. They separate dis- tance calculation, price calculation and invoice generation. What is the principal benefit? A. It prevents all logical errors B. It allows individual components to be developed and tested more easily C. It eliminates the need for variables D. It makes the algorithm independent of input Answer: B 15. Which of the following is an example of a problem that can benefit from pattern recognition? A. Identifying repeated calculations across several financial applications B. Increasing the brightness of a monitor C. Installing additional RAM D. Physically connecting a printer
Answer: A
16. What is the purpose of a flowchart? A. To provide a graphical representation of an algorithm B. To permanently store program variables C. To encrypt the source code D. To replace all programming languages Answer: A 17. In problem-solving, why should a programmer identify the requirements before de- veloping an algorithm? A. To remove the need for debugging B. To ensure the solution addresses the intended problem C. To prevent the computer from executing loops D. To guarantee that the program uses no memory Answer: B 18. A programmer creates a simplified model of a traffic-light system that includes only signal states and timing. What is this an example of? A. Decomposition B. Abstraction C. Selection D. Sorting Answer: B 19. Which description best matches computational thinking? A. Using computer hardware to increase processing speed B. Applying logical problem-solving techniques to develop computational solutions C. Writing code without planning D. Replacing algorithms with manual calculations Answer: B 20. Which characteristic is most likely to make an algorithm difficult to maintain? A. Clear variable names B. Modular structure
D. It makes every programming language identical Answer: A SECTION 2: FLOWCHARTS AND PSEUDOCODE
26. Which flowchart symbol is normally used to represent the beginning or end of an algorithm? A. Diamond B. Rectangle C. Oval D. Parallelogram Answer: C Rationale: An oval or terminator symbol represents the start or end of a flowchart. 27. Which flowchart symbol represents a decision? A. Diamond B. Rectangle C. Oval D. Arrow Answer: A 28. Which symbol is normally used for a process such as calculating a total? A. Diamond B. Rectangle C. Oval D. Parallelogram Answer: B 29. A flowchart asks a user to enter their age. Which symbol should be used for the in- put operation?
A. Rectangle B. Diamond C. Parallelogram D. Oval Answer: C
30. What is the purpose of flowchart arrows? A. To indicate the direction in which the algorithm progresses B. To identify variables that cannot change C. To calculate mathematical values D. To store data permanently Answer: A 31. In pseudocode, what does the statement total = total + price normally mean? A. Set price equal to total B. Increase total by the value of price C. Subtract total from price D. Output the total without changing it Answer: B 32. Which pseudocode structure is most appropriate when a program must choose be- tween two alternative actions? A. Sequence B. Selection C. Declaration D. Assignment only Answer: B 33. What is the main purpose of indentation in structured pseudocode? A. To encrypt program instructions B. To make the structure and nesting of instructions easier to understand C. To increase variable storage D. To change numerical values Answer: B
Answer: B
38. Which statement correctly describes a condition in pseudocode? A. It always stores text B. It evaluates to a Boolean result C. It must always calculate a sum D. It cannot involve variables Answer: B 39. What will be output? x = 12 if x > 10 then print("High") else print("Low") endif A. Low B. 12 C. High D. Nothing Answer: C 40. Which statement best describes a nested selection? A. A decision structure inside another decision structure B. A variable inside an array C. A loop without a condition D. An output statement inside a file Answer: A 41. What is the purpose of a dry run? A. To execute a program without checking its results B. To manually follow an algorithm and determine how it behaves
C. To permanently delete variables D. To convert code into binary Answer: B
42. Which pseudocode statement correctly outputs the value of a variable called score? A. INPUT score B. score = OUTPUT C. OUTPUT score D. IF score Answer: C 43. What will this algorithm output? a = 5 b = 2 a = a + b b = a - b print(a) print(b) A. 5 and 2 B. 7 and 5 C. 7 and 2 D. 2 and 7 Answer: B 44. Which statement is most appropriate for representing a repeated process in a flow- chart? A. A decision symbol connected back to an earlier instruction B. A terminator without arrows C. A single output symbol D. A disconnected rectangle Answer: A 45. What is a common benefit of pseudocode?
50. Which statement is true about pseudocode? A. It must follow the syntax of Python exactly B. It is a planning method for expressing algorithms in a readable form C. It can only represent algorithms involving arrays D. It cannot contain selection or iteration Answer: B SECTION 3: VARIABLES, CONSTANTS, DATA TYPES AND OPERATORS 51. Which data type is most appropriate for storing a person's age in whole years? A. Boolean B. Integer C. Real D. Character Answer: B Rationale: An integer stores whole numbers without fractional components. 52. A program stores the price of an item as 19.75. Which data type is most appropriate? A. Integer B. Boolean C. Real D. Character Answer: C Rationale: Real numbers can represent decimal values. 53. Which data type is most suitable for storing whether a student has passed an exam- ination? A. Boolean B. Integer C. Real D. Array Answer: A Rationale: Boolean values represent logical states, typically True or False.
54. What is a variable? A. A value that cannot be changed during execution B. A named storage location whose value can change C. A programming error that cannot be corrected D. A type of computer processor Answer: B 55. What is the purpose of a constant in a program? A. To store a value intended to remain unchanged B. To store values that change after every iteration C. To execute a selection statement D. To receive keyboard input only Answer: A 56. Which identifier is most suitable for storing a student's examination score? A. 123score B. student score C. studentScore D. score!student Answer: C 57. Which operator is used to calculate the remainder after integer division? A. / B. MOD C. DIV D. ** Answer: B 58. What is the result of 17 DIV 5? A. 3. B. 2 C. 3 D. 5 Answer: C
64. Which expression correctly checks whether a number is between 10 and 20 inclusive? A. number >= 10 AND number <= 20 B. number < 10 OR number > 20 C. number = 10 AND number = 20 D. number > 10 AND number < 20 Answer: A 65. What is the value of 5 + 3 * 2 when standard operator precedence is applied? A. 16 B. 11 C. 13 D. 10 Answer: B 66. What is the value of (5 + 3) * 2? A. 13 B. 11 C. 16 D. 10 Answer: C 67. Which operator is used to compare two values for equality in many pseudocode conventions? A. = B. + C. <> D. * Answer: A 68. What does the comparison score <> 50 mean? A. Score is greater than 50 B. Score is less than 50 C. Score equals 50 D. Score is not equal to 50
Answer: D
69. Which expression evaluates to True if x is either 5 or 10? A. x = 5 AND x = 10 B. x = 5 OR x = 10 C. x <> 5 AND x <> 10 D. x < 5 AND x > 10 Answer: B 70. What is the main purpose of using meaningful variable names? A. To make code easier to understand and maintain B. To increase processor speed automatically C. To prevent all runtime errors D. To eliminate the need for data types Answer: A 71. Which data type is most appropriate for storing the number of books borrowed? A. Boolean B. Integer C. Real D. Character Answer: B 72. Which data type would be most appropriate for storing a single letter grade such as A? A. Integer B. Real C. Character D. Boolean Answer: C 73. A program stores a customer's full name. Which data type is most appropriate? A. Boolean B. String C. Integer D. Real
A. Adult B. Minor C. 18 D. Nothing Answer: B
78. Which condition correctly identifies a number that is negative? A. number >= 0 B. number = 0 C. number < 0 D. number <> 0 Answer: C 79. A program awards a discount when a customer spends at least £100. Which condi- tion is correct? A. total > 100 B. total >= 100 C. total <= 100 D. total = 0 Answer: B 80. What is the purpose of ELSE in an IF-ELSE structure? A. To define a variable B. To execute an alternative branch when the IF condition is false C. To restart the algorithm D. To declare a constant Answer: B 81. What will the following algorithm output? x = 15 if x > 20 then print("A") elseif x > 10 then print("B") else print("C") endif
D. A and B Answer: C
82. Why is the order of conditions important in an IF-ELSEIF structure? A. Only the first satisfied branch is executed, so broad conditions may prevent later spe- cific conditions from being reached B. Conditions cannot contain numbers C. Every condition is executed regardless of its result D. The order determines variable data types Answer: A 83. A system accepts ages from 0 to 120 inclusive. Which condition identifies invalid ages? A. age >= 0 AND age <= 120 B. age < 0 OR age > 120 C. age > 0 AND age < 120 D. age = 0 OR age = 120 Answer: B 84. Which logical expression checks that a password is not empty and its length is at least eight characters? A. password = "" OR length(password) < 8 B. password <> "" AND length(password) >= 8 C. password = "" AND length(password) >= 8 D. length(password) = 0 Answer: B 85. A student must be in Year 10 or Year 11 to access a resource. Which condition cor- rectly implements this?