← All APCSP Flashcard Decks

Computational Thinking Practices Flashcards

7 cards from real APCSP practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 7 Computational Thinking Practices flashcards as text
  1. A student is writing a program to sort a list of names. She first writes a version that works correctly, then revises it to be faster. What two computational thinking practices does this sequence demonstrate?

    Answer: Correctness first, then optimization

    Getting a correct solution before optimizing it is a best practice — it separates the goal of correctness from the goal of efficiency.

  2. Which of the following is the BEST reason to use a model or simulation instead of a real-world experiment?

    Answer: Simulations are cheaper, faster, or safer when real experiments are impractical

    Simulations are used when real experiments are too expensive, dangerous, slow, or logistically impossible (e.g., simulating a nuclear reactor or climate change).

  3. A student writes a program that checks whether a number is prime. She tests it on 2, 3, 7, and 11 and it works. Then she tests it on 1 and it returns 'prime' — which is incorrect. What type of input did she fail to account for?

    Answer: A boundary / edge case

    The number 1 is a boundary case (edge case) that behaves differently from typical primes — failing to test it revealed a bug in the logic.

  4. Which of the following statements about data abstraction is MOST accurate?

    Answer: Data abstraction allows programmers to use data structures without knowing their underlying implementation

    Data abstraction lets programmers use lists, dictionaries, and other structures based on their interface and behavior, without needing to know how they are implemented internally.

  5. A student evaluates two algorithms that both solve the same problem. Algorithm A always takes 1 second regardless of input size; Algorithm B takes longer as input size grows. Which algorithm is MORE scalable?

    Answer: Algorithm A, because its runtime does not grow with input size

    Algorithm A has constant time complexity, meaning it scales perfectly — its performance does not degrade as input size increases.

  6. In the context of computational thinking, what is the purpose of creating a 'flowchart' before writing code?

    Answer: To visually represent the logic and flow of an algorithm before implementation

    A flowchart visually maps out the decision points, loops, and sequence of steps in an algorithm, helping the programmer plan logic before writing actual code.

  7. Which of the following is the MOST appropriate use of a lookup table in an algorithm?

    Answer: To store precomputed results so they don't need to be recalculated repeatedly

    A lookup table (also called memoization when used in dynamic programming) stores precomputed values, avoiding redundant calculations and improving efficiency.