A function call invokes a function with specific arguments. The function runs, returns a result, and resumes execution at the line following the call. Parentheses immediately after a function name usually mark the call. section 3.1.2 section 3.5
Use a function call to:
- Supply one argument for each parameter, using values of appropriate types. section 3.1.2
- Capture a returned result in a variable when it will be needed later. section 3.1.2
- Test behavior by calling the function with different inputs, including interactive calls. section 3.3.1
- Follow nested execution: one function can call another, then continue after that inner call returns. section 3.5
Calling a function and checking its result
Given a function named money_made, call money_made(10, 15, 17). Python passes the three arguments, computes the result, and displays 20. Calling it with 10, 17, and 15 displays -20; equal prices display 0. section 3.3.1
# call the larger function with the values 3 and 5 # store the result in a variable called result # then print result result = larger(3, 5) #1 print(result)
A compact Python example shows how a call passes values, stores the returned value, and prints it. section 3.1.2






