Python Functions · Week 1 — Your First Function (Practice)
30 questions: defining and calling simple functions. 5 challenge questions at the end.
Python Coding Practice: Python Functions Week 1: Your First Function (Level 1)
This is a new set of coding questions about writing your first Python functions.
You will define and call your own functions to solve each problem.
Reminder
- Use
def function_name():to define a new function, ending with a colon. - Write the code inside the function indented (usually 4 spaces).
- Call your function by typing its name followed by parentheses:
function_name(). - Use
returninside a function to send a result back to the caller.
Preview truncated — download the notebook to see the full lesson.