Term 1 - Python Functions - W11 - Quiz1
Term 1 - Python Functions - W11 - Quiz1
• How do you define a function in Python? Can you give a simple example?
• What is the difference between a function that returns a value and one that does not?
• What are keyword arguments, and how do they differ from positional arguments?
• How can you define a function that accepts an arbitrary number of arguments?
• Can you explain what a lambda function is and when you might use it?
• What is the scope of a variable defined inside a function? Can it be accessed outside
the function?
• How can you pass a list to a function and modify its contents?