🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Refactoring with AI: all 10 questions

Quiz: Refactoring with AI · Question 7 of 10

Why keep integer arithmetic (// 100) in the refactor instead of switching to floats?

Why keep integer arithmetic (// 100) in the refactor instead of switching to floats?

  1. A.Floats are not allowed in Python 3
  2. B.Integers are always faster
  3. C.Float rounding could change some results by a rupee, which is a behaviour change
  4. D.The AI cannot write float code
Answer & explanation

Correct answer: Float rounding could change some results by a rupee, which is a behaviour change

Changing number types is a classic hidden behaviour change.

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 →