Defining and calling functions
Functions in Python are defined using the def keyword followed by the function name and parentheses containing parameters. The function body is indented and may include a return statement to send a value back to the caller. If no return statement is present, the function returns None. Functions are called by using their name followed by parentheses containing arguments. Parameters are the variables listed in the function definition, while arguments are the actual values passed to the function when it's called. Functions can have docstrings (triple-quoted strings immediately after the definition) that document what the function does. Proper function design involves giving functions clear, descriptive names and keeping them focused on a single task. Functions help organize code logically, reduce duplication, and make programs easier to understand and maintain. They also facilitate testing since each function can be tested independently.