NANDHOO
.
Learning Paths
Dashboard
Sign In
Home
Dashboard
Python Programming: From Beginner to Production
Functions
Quiz
Chapter Quiz: Functions
Functions Quiz
Complete this assessment with 100% score to master this chapter.
01
Which keyword is used to define a function in Python?
function
def
func
define
02
What does a function return when it has no 'return' statement?
0
False
None
An empty string
03
What is the purpose of *args in a function definition?
To require at least one argument
To accept any number of keyword arguments as a dict
To accept any number of positional arguments as a tuple
To make all parameters optional
04
What is a lambda function?
A function that can only run once
A small, anonymous function defined with the lambda keyword
A function that is imported from a library
A function that always returns None
05
What is a closure in Python?
A function that closes the program
A function that remembers variables from the scope where it was defined
A way to delete a variable after use
A function that blocks access to global variables
Submit Answers
Back to Lesson
Next Chapter