🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Python Interview Programs: all 13 questions

Quiz: Python Interview Programs · Question 1 of 13

What does reversenumber(1200) (from this lesson) return?

What does reverse_number(1200) (from this lesson) return?

  1. A.0021
  2. B.21
  3. C.2100
  4. D.1200
Answer & explanation

Correct answer: 21

rev builds 0, 0, 2, 21 — leading zeros disappear in an integer.

Can you get the rest right without peeking?

Take the timed Quiz: Python Interview Programs quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →