Question 15
Back to Exercise
Why is return usually better than print inside a function?
- A print is slower
- B print is not allowed in functions
- C The caller can use the returned value in further calculations; a printed value is only shown Correct
- D return also prints the value
Correct Answer: Option C
A function that prints returns None, so x = f() * 2 fails.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!