Knowledge Check: Module 16

Back to Dashboard

Answer the following 10 questions about Module 16: Defining Simple Functions. You need to score at least 6 out of 10 to pass this check. You can retake this check as many times as you need. Good luck!

1 Which keyword is used to start the definition of a function in Python?

2 What follows the function name in a function definition line?

3 What character must end the first line of a function definition (the def line)?

4 How does Python know which lines of code belong inside a function?

5 What does it mean to "call" a function?

6 Consider this code:
def greet():
    print("Hello there!")

greet()
What is the output?

7 Which of the following is a primary benefit of using functions in programming?

8 What happens if you define a function but never call it in your script?

9 Which of the following shows the correct way to CALL a function named calculate_area?

10 Can a function definition include a call to another already defined function?

Your score: 0/10