← back to unit
Easy
# basics functions
Multiple Parameters
Functions can take more than one parameter — just separate them with commas:
def add(a, b):
return a + b
print(add(3, 4))
prints: 7
Your turn: we've already read two numbers into a and b for you. Define a function add(a, b) that returns a + b, then print add(a, b).
💡 need a hint?
pyb-func-multi-params.py🔒 given lines are locked — write your code in between
loading...