Guide-linked quiz · Medium Level

AI Coding Quiz

Review AI-generated code against requirements, repository conventions, current APIs, meaningful tests, security, and rendered behavior.

Related guide pathsAI Coding
Question 1 of 8

A generated function passes a type check. What does the guide say that proves?

Preview every question8 questions

Answers and explanations appear as you take the quiz.

  1. A generated function passes a type check. What does the guide say that proves?
    • Only that the checked type constraints passed; requirements and runtime behavior still need review
    • That the code matches intended behavior
    • That security has been verified
    • That repository conventions were followed
  2. What project information helps an assistant produce code that fits an existing repository?
    • Only the programming language
    • Problem, architecture, interfaces, constraints, and expected behavior
    • A request for the shortest possible code
    • The number of files in the repository
  3. A suggested package name sounds plausible. What should a developer do before adding it?
    • Install it immediately
    • Assume it is an official API
    • Check that it exists, is reputable, and suits the project
    • Ask the model to generate a second package name
  4. Generated JavaScript calls sort() on [2, 10, 1] without a numeric comparator. Which output demonstrates the guide’s bug?
    • [1, 2, 10]
    • [2, 10, 1]
    • [10, 2, 1]
    • [1, 10, 2]
  5. How should a bug fix demonstrate that the original failure was corrected?
    • Keep a meaningful test for the failure and verify its expectation was not weakened
    • Delete the failing test after the code changes
    • Change the test until it passes without checking the requirement
    • Rely only on the model’s explanation
  6. Which tests best help review generated code?
    • Only a test of the happy path
    • Meaningful cases, including boundaries and failures
    • A test that repeats implementation assumptions only
    • No tests if the code compiles
  7. What should a reviewer look for in the final diff?
    • Only formatting differences
    • The file’s last modified time
    • Unrelated edits, sensitive data, destructive operations, and missing error handling
    • The number of comments added
  8. A code change affects a user interface. What extra verification does the guide recommend?
    • Check only that the app compiles
    • Ask the model whether the design looks good
    • Inspect component names
    • Inspect the rendered or operational result as well as automated checks

Keep testing yourself

More quizzes picked for your level.

View all quizzes