🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Python Variables and Data Types: all 15 questions

Quiz: Python Variables and Data Types · Question 15 of 15

What does this print? (code)

What does this print?

a = b = 10
b = b + 5
print(a, b)
  1. A.15 15
  2. B.10 15
  3. C.10 10
  4. D.15 10
Answer & explanation

Correct answer: 10 15

Both names start at 10. b = b + 5 makes b point to the new number 15; a still has 10.

Can you get the rest right without peeking?

Take the timed Quiz: Python Variables and Data Types quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →