Class 10 Computer Science: Python Functions and Modules Worksheet
Answer the questions and tap Submit to see your score. Your progress is auto-saved on this device.
Jump to question
Q1 · MCQ · 1 mark
Which keyword is used to define a function in Python?
Q2 · FILL · 1 mark
Variables defined inside a function have a ______ scope, meaning they are only accessible within that function.
Q3 · MCQ · 1 mark
What will be the output of the following Python code?
def greet(name):
print("Hello,", name)
greet("Alice")
Q4 · SHORT · 2 marks
Explain the purpose of the 'return' statement in a Python function.
Q5 · MCQ · 1 mark
Which of the following is an example of a built-in Python module?
Q6 · FILL · 1 mark
The process of packaging code into reusable units is known as creating ______.
Q7 · MCQ · 1 mark
What does a function header typically consist of?
Q8 · SHORT · 2 marks
Differentiate between formal parameters and actual arguments in a function.
Q9 · MCQ · 1 mark
How do you import a module named 'random' into your Python script?
Q10 · FILL · 1 mark
A function that doesn't explicitly return a value actually returns the special value ______.