Free practice · single-choice · medium

Practice

Spot a missing return

A function calculates result = hours * rate but has no return statement. What value does Python return implicitly?

Function contract trace

A caller supplies values and receives one defined result

  1. ContractDefine inputs, output, and failures
  2. ArgumentsEvaluate supplied values
  3. ParametersBind local names
  4. BodyRun focused local logic
  5. ReturnSend the result to the caller
  6. TestCheck the public contract

Keep argument evaluation, parameter binding, local state, return behavior, and external side effects visible at the function boundary.

Choose one answer