Previous

Functions

4 / 6
Next

Functions can return values using the return statement. For example:

def add(a, b):
    return a + b

This allows functions to compute values that can be used whenever the function is called.

result = add(3, 5)

The variable result will now have value 8.

Send

Return values

Hint
Beginner

Create a function called minimum that takes two parameters (numbers) and returns the lowest.

Help
Solve
Reset
Run
Submit
 

Test results

Test result #
Expected output
Your output

Your email has been verified!