Class 12 Computer Science: Functions and Recursion
This worksheet will test your understanding of defining and calling functions in Python, as well as the concept of recursion and its application.
Class 12CBSEComputer ScienceeasyPractice
Preview · 10 questions
- Q1. Which keyword is used to define a function in Python?
- function
- define
- def
- func
- Q2. A function that calls itself is known as a _______________ function.
- Q3. Explain the purpose of the 'return' statement in a Python function.
- Q4. What is the output of the following Python code: def greet(name): print('Hello, ' + name) greet('Alice')
- Hello
- Hello, Alice
- Alice
- Error
- Q5. Arguments passed to a function by their position in the function call are called _______________ arguments.
+ 5 more in the printable PDF.