A function is a block of ____ code that performs a specific task.
Answer: reusable
To define a function in Python, use the ____ keyword.
Answer: def
The ____ statement is used to return a value from a function.
Answer: return
Parameters are variables declared in a function’s ____, while arguments are the values passed to the function when it is ____.
Answer: definition, called
A function with default arguments allows you to call the function without providing ____ for those arguments.
Answer: values
The ____ keyword is used to specify arguments by name when calling a function.
Answer: keyword
A ____ error occurs when the indentation of a function’s body is incorrect.
Answer: syntax
The ____ function in Python is used to display output to the console.
Answer: print
A function can have multiple ____ arguments, each with a default value.
Answer: optional
The ____ operator is used to multiply two numbers in a function.
Answer: *
In Python, the ____ keyword is used to define a function that does not return any value.
Answer: def
The ____ of a rectangle can be calculated using the formula length × width
.
Answer: area
A function can be called multiple times to improve ____ and avoid code repetition.
Answer: reusability
The ____ function is used to check if a number is even or odd.
Answer: is_even
In Python, ____ arguments allow you to specify default values for parameters.
Answer: default
The ____ keyword is used to specify the end of a function definition.
Answer: colon (:
)
A ____ is a string that explains the purpose of a function and is placed immediately after the function definition.
Answer: docstring
The ____ function in Python is used to take input from the user.
Answer: input
A ____ is a variable that is passed to a function when it is called.
Answer: argument
The ____ keyword is used to define a function in Python.
Answer: def