← All topics
Quiz: Refactoring with AI: questions with answers
10 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. Which of these is a refactor?
- Q2. What does a characterization (golden master) test check?
- Q3. What does this print? (code)
- Q4. The AI wrote cgpa 9.0 where the old code had cgpa = 9.0. Which test input reveals it?
- Q5. What does this print? (code)
- Q6. A golden-master comparison shows the AI's refactor gives sports students a different fee. The old rule may even be wrong. What should you d…
- Q7. Why keep integer arithmetic (// 100) in the refactor instead of switching to floats?
- Q8. What does this print? (code)
- Q9. Why do one small refactor per commit?
- Q10. Which request is risky to give an AI in one go during a refactor?