Understanding Python function return behavior
This is an easy Python language-knowledge question that tests your understanding of how functions handle return statements and control flow. It's the kind of question that appears in initial screening rounds to confirm you can trace code execution mentally and understand Python semantics correctly.
The question asks you to read a short program and predict its output. Solving it requires careful attention to where execution paths lead, what values functions return, and how Python evaluates function calls. Even though the difficulty is low, precision matters—off-by-one errors or confusion about return semantics will lead to an incorrect answer.
- Function return statements and implicit returns
- Control flow and execution order
- Value vs. reference semantics in Python