← Quiz: Refactoring with AI: all 10 questions
Quiz: Refactoring with AI · Question 8 of 10
What does this print? (code)
What does this print?
old = {(9.0, 0): 30000, (8.5, 0): 45000, (6.0, 0): 60000}
new = {(9.0, 0): 45000, (8.5, 0): 45000, (6.0, 0): 60000}
print(sum(old[k] != new[k] for k in old))
- A.1
- B.0
- C.2
- D.3
Answer & explanation
Correct answer: 1
Only the 9.0 case differs.
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 →