🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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 →
  1. Q1. Which of these is a refactor?
  2. Q2. What does a characterization (golden master) test check?
  3. Q3. What does this print? (code)
  4. Q4. The AI wrote cgpa 9.0 where the old code had cgpa = 9.0. Which test input reveals it?
  5. Q5. What does this print? (code)
  6. 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…
  7. Q7. Why keep integer arithmetic (// 100) in the refactor instead of switching to floats?
  8. Q8. What does this print? (code)
  9. Q9. Why do one small refactor per commit?
  10. Q10. Which request is risky to give an AI in one go during a refactor?