Python Function Definition Quiz
Multiple ChoiceBeginner
Question
Which keyword is used to define a function in Python?
Hint
It is short for 'define'.
Explanation
Python uses the def keyword to define functions, followed by the function name and parameters in parentheses. For example: def greet(name):. The keywords function, func, and define are used in other languages (JavaScript, Go, etc.) but not in Python.
Related Resources
Related Lessons
- Python Functions
Learn how to define and call functions in Python.
Related Cheatsheets
- Python Cheatsheet
Quick reference for Python function syntax.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.