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
  1. Q1. Which keyword is used to define a function in Python?
    • function
    • define
    • def
    • func
  2. Q2. A function that calls itself is known as a _______________ function.
  3. Q3. Explain the purpose of the 'return' statement in a Python function.
  4. Q4. What is the output of the following Python code: def greet(name): print('Hello, ' + name) greet('Alice')
    • Hello
    • Hello, Alice
    • Alice
    • Error
  5. Q5. Arguments passed to a function by their position in the function call are called _______________ arguments.

+ 5 more in the printable PDF.