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

Quiz: Python Functions · Question 15 of 15

What is the difference between print() and return inside a function?

What is the difference between print() and return inside a function?

  1. A.There is no difference
  2. B.return shows the value on the screen; print sends it back
  3. C.print ends the function; return does not
  4. D.print shows a value on the screen; return sends a value back to the caller
Answer & explanation

Correct answer: print shows a value on the screen; return sends a value back to the caller

A function that only prints returns None, so you cannot use its result in a calculation.

Can you get the rest right without peeking?

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

Start the quiz →