← Quiz: Refactoring with AI: all 10 questions
Quiz: Refactoring with AI · Question 1 of 10
Which of these is a refactor?
Which of these is a refactor?
- A.Changing the late fee from ₹500 to ₹600 per day
- B.Extracting the scholarship rule into its own function without changing any output
- C.Fixing a wrong discount for sports students
- D.Adding a new hostel fee type
Answer & explanation
Correct answer: Extracting the scholarship rule into its own function without changing any output
A refactor changes structure, never behaviour.
Can you get the rest right without peeking?
Take the timed Quiz: Refactoring with AI quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →