Q5

Week 5 Quiz

Functions and Modular Programming

Student Information

Question 1: Multiple Choice (2 points)

What keyword is used to define a function in Python?

Question 2: Short Answer (3 points)

Write a function called 'greet' that takes a name parameter and returns "Hello, [name]!":

Question 3: Multiple Choice (2 points)

What does the 'return' statement do in a function?

Question 4: True/False (2 points)

Functions can have multiple parameters separated by commas.

Question 5: Multiple Choice (1 point)

What happens if you call a function without providing all required parameters?

← Back to Lesson Semester Overview Next Lesson →