



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. Which scenario best illustrates abstraction in computer science? A. Listing every electrical signal that moves through a processor during execution. B. Representing a customer with only the fields needed for a program, such as name, email, and account balance. C. Choosing the largest available hard drive before designing a program. D. Running every possible test case before writing pseudocode. 2. In the following pseudocode, what value is printed? SET i = 1 SET total = 0 WHILE i <= 4 SET total = total + i SET i = i + 1 END WHILE PRINT total A. 4 B. 6 C. 10 D. 15 3. A variable that stores only True or False values should usually be represented with which data type? A. String B. Integer C. Boolean D. Floating-point number
4. What is the best interpretation of the assignment statement SET count = count + 1? A. Compare count to count + 1 and return True if they are equal. B. Replace count with a new value that is one greater than its current value. C. Create a constant named count that can never change. D. Declare count as a string variable. 5. A program uses the condition age >= 18 AND hasValidID = True. When does the condition evaluate to True? A. Only when both age is at least 18 and hasValidID is True. B. When either age is at least 18 or hasValidID is True. C. Only when age is exactly 18 and hasValidID is False. D. Whenever age is less than 18 because AND reverses the comparison. 6. What is a major benefit of organizing a program into functions? A. Functions make all variables global by default. B. Functions prevent a program from using input or output. C. Functions support reuse, modular design, and easier testing. D. Functions remove the need for algorithms. 7. Which situation is most likely to create an infinite loop? A. A loop checks a condition before running its body. B. A loop prints more than one line of output. C. A loop control variable is never updated so the stopping condition is never reached. D. A loop includes an IF statement inside its body. 8. What distinguishes a pretest loop from a posttest loop? A. A pretest loop checks its condition before each iteration; a posttest loop checks after the loop body runs. B. A pretest loop can only count upward; a posttest loop can only count downward. C. A pretest loop cannot contain variables; a posttest loop must contain strings. D. A pretest loop is always faster than a posttest loop. 9. Which set of qualities best describes a sound algorithm? A. Ambiguous, hardware-specific, and dependent on one user. B. Correct, finite, clear, and reasonably efficient for the task. C. Written only in a compiled programming language. D. Designed to avoid input, output, and testing. 10. Which statement best distinguishes lossless compression from lossy compression? A. Lossless compression permanently discards data; lossy compression preserves all data. B. Lossless compression allows the original data to be reconstructed exactly; lossy compression sacrifices some detail to reduce size. C. Lossless compression works only on video; lossy compression works only on text. D. Lossless compression always creates a larger file than the original.
18. Using standard operator precedence, what is the value of 2 + 3 * 4? A. 20 B. 14 C. 24 D. 9 19. What is the purpose of a trace table when evaluating pseudocode? A. To list the brand names of hardware components. B. To record variable values step by step so the logic can be checked. C. To automatically compile a program into machine code. D. To encrypt all program input. 20. Which test case is the best example of checking a boundary condition for a rule that accepts ages 18 through 65 inclusive? A. Age 42 only B. A random name with no age C. Ages 17, 18, 65, and 66 D. Only ages greater than 100 21. A developer writes a program that uses a named constant TAX_RATE instead of typing 0. throughout the code. What is the best reason for doing this? A. It makes the program run without using memory. B. It improves readability and makes future updates less error-prone. C. It forces TAX_RATE to become a string. D. It prevents all syntax errors. 22. What does an intellectual property license generally define? A. The physical weight of a computer system. B. The terms under which someone may use, copy, modify, or distribute protected work. C. The order in which arithmetic operators are evaluated. D. The clock speed of a CPU. 23. Which action best reflects ethical handling of user data in a software project? A. Collecting all possible data because storage is inexpensive. B. Sharing user data with third parties without notice because it improves revenue. C. Collecting only needed data, securing it, and explaining how it will be used. D. Ignoring privacy requirements until after deployment. 24. A hiring algorithm rejects applicants from one region at a much higher rate because the training data underrepresented successful workers from that region. Which concern is most directly shown? A. Algorithmic bias B. Lossless compression C. Binary overflow only D. CPU cache locality
25. A wearable health device must be small, inexpensive, and battery efficient while collecting data from sensors. Which architecture consideration is most important? A. Using the highest-power desktop processor available regardless of heat or battery life. B. Balancing processing capability with power use, size, cost, and input/output needs. C. Ignoring memory because all devices have unlimited storage. D. Choosing a monitor before considering the processor or sensors.