Skip to content

This textbook is in beta – content is actively being refined. Report issues or suggestions

02.07 Brief Paradigms Overview - Quiz

Check your understanding

  1. What is a programming paradigm?

    • A specific programming language
    • A fundamental style or approach to programming { data-correct }
    • A type of computer hardware
    • A debugging technique
  2. Which paradigm focuses on step-by-step instructions and changing variables?

    • Object-oriented
    • Functional
    • Imperative { data-correct }
    • Logic
  3. What is the core idea of object-oriented programming?

    • Write mathematical functions
    • Model the world as interacting objects { data-correct }
    • Create step-by-step instructions
    • Express facts and rules
  4. Which paradigm would be best suited for creating an expert system that diagnoses medical conditions based on symptoms?

    • Imperative
    • Object-oriented
    • Logic { data-correct }
    • Functional
  5. What distinguishes functional programming from other paradigms?

    • Uses objects with methods
    • Focuses on mathematical functions and immutable data { data-correct }
    • Requires step-by-step instructions
    • Only works with logical rules
  6. Which statement about programming paradigms is most accurate?

    • Only one paradigm should be used per program
    • Imperative programming is always the best choice
    • Different paradigms are suited to different types of problems { data-correct }
    • All paradigms produce identical results
  7. If you were building a video game with players, enemies, and items, which paradigm would be most natural?

    • Logic programming
    • Functional programming
    • Object-oriented programming { data-correct }
    • Pure mathematical functions
  8. What does “immutability” mean in functional programming?

    • Functions cannot be combined
    • Variables cannot change once set { data-correct }
    • Objects cannot have methods
    • Programs cannot have loops