Courses
Courses for Kids
Free study material
Offline Centres
More
Store Icon
Store

Important Questions and Answers for Class 11 Computer Science Chapter 7 Functions 2025-26

ffImage
banner

Practice Important Questions for Class 11 Computer Science Chapter 7 Functions with Answers PDF

Here, you will find Important Questions Class 11 Computer Science Chapter 7 Functions. These questions are aligned with the latest CBSE syllabus and focus on core topics for exam preparation. 


Chapter 7 explains how functions work in Python and covers key definitions, examples, and code snippets. You can practice with Important questions class 11 computer science chapter 7 functions with answers to understand how to write clear, step-marked responses. 


This set also includes MCQs and questions in different formats to match real exam styles. Click below to download the free Important Questions PDF with answers from Vedantu and start your revision instantly.


Practice Important Questions for Class 11 Computer Science Chapter 7 Functions with Answers PDF

1. Multiple choice questions.

Q1. Which of the following keywords is used to define a function in Python?


  • (a) func
  • (b) define
  • (c) def
  • (d) function

Answer: (c) def


Q2. What will the following code print? def foo(): return 5+5
print(foo())


  • (a) 10
  • (b) foo
  • (c) None
  • (d) Error

Answer: (a) 10


Q3. Which of the following functions will return multiple values as a tuple in Python?


  • (a) print()
  • (b) input()
  • (c) A user-defined function with multiple values in return
  • (d) range()

Answer: (c) A user-defined function with multiple values in return


Q4. What is the output of print(type(lambda x: x*2))?


  • (a) <class 'function'>
  • (b) <class 'lambda'>
  • (c) <function object>
  • (d) None

Answer: (a) <class 'function'>


Q5. Which statement about local and global variables in Python is TRUE?


  • (a) Local variables can be accessed anywhere in the program
  • (b) Global variables can only be accessed inside functions
  • (c) Local variables exist only inside the function where they are defined
  • (d) Global variables must be named with “global” at the start

Answer: (c) Local variables exist only inside the function where they are defined


2. Very Short Answer (VSA).


Q1. What is a function in Python?


Answer: A function in Python is a named group of statements that performs a specific task and can be invoked as needed in a program.


Q2. What is the difference between an argument and a parameter?


Answer: An argument is the actual value supplied to a function during a call, whereas a parameter is the variable listed in the function definition to receive the argument.


Q3. State the purpose of the return statement in a function.


Answer: The return statement ends a function’s execution and sends a value or values back to the caller.


Q4. Give one example each of a built-in function and a user-defined function.


Answer: Built-in function: print(). User-defined function: def sum(a, b): return a+b


Q5. What is a local variable?


Answer: A local variable is declared inside a function or block and is accessible only within that scope.


3. Short Answer Questions.


Q1. Explain two advantages of using functions in a program.


Answer: Functions make code more readable by dividing it into logical sections, and they enhance code reusability by allowing a set of statements to be reused multiple times in a program or across programs.


Q2. What is the difference between a built-in function and a user-defined function in Python?


Answer: Built-in functions like len() and sum() are provided by Python and can be used directly, while user-defined functions are written by the programmer to perform specific tasks.


Q3. How can a Python function have a default parameter? Illustrate with an example.


Answer: By assigning a default value to a parameter in the function definition, e.g., def greet(name="Student"):. If the argument is not passed, the default is used.


Q4. What is meant by scope of a variable? Differentiate between global and local scope with example.


Answer: The scope determines where a variable is accessible. A global variable is accessible throughout the program, while a local variable is only accessible inside the function in which it is declared.


Q5. Write a function in Python to return the product of two numbers.


Answer:

def product(a, b):
    return a * b


4. Long Answer Questions.


Q1. Describe with an example how a function in Python can return multiple values. Why is this useful?


Answer: In Python, a function can return multiple values as a tuple. For example:


def rectangle_props(length, breadth):
    area = length * breadth
    perimeter = 2 * (length + breadth)
    return area, perimeter

a, p = rectangle_props(5, 3)
This feature lets a function compute and provide several related quantities together, making the code cleaner and easier to understand.
  1. Define a function with multiple values in the return statement
  2. Assign the returned values to separate variables


Q2. Briefly discuss the use of Python standard library modules such as math and random in programs. Give examples.


Answer: The Python standard library provides modules like math for mathematical operations (e.g., math.sqrt(25)) and random for generating random numbers (e.g., random.randint(1,10)). These modules simplify complex tasks, save development time, and improve code reliability.

  1. Import the required module (e.g., import math)
  2. Use its functions (e.g., math.ceil(x), random.random()) as needed in the program


Q3. Explain what happens if a function is called before it is defined in a Python program. Support your answer with a code example and output.


Answer: If a function is called before its definition in a Python script, the interpreter raises a NameError, as it does not recognize the function’s name. For instance:


helloWorld()
def helloWorld():
    print("Hello")
This code produces an error: NameError: name 'helloWorld' is not defined.
  1. Interpreter reads line by line
  2. Encounters function call before its definition
  3. Throws NameError


Q4. With reference to functions in Python, differentiate among function with no argument and no return value, function with argument and no return value, function with argument and return value.


Answer:

  • No argument, no return: Processes data within function, e.g., def greet(): print("Hi")
  • With argument, no return: Receives data, processes but does not return, e.g., def show(x): print(x)
  • With argument and return: Receives and processes input, returns result, e.g., def add(a,b): return a+b


4. True or False Questions.


Q1. In Python, the global keyword is required to access a global variable inside a function if you only want to read its value.


Answer: False


Q2. Default parameters in Python functions must always be trailing parameters in the function header.


Answer: True


Q3. In Python, a function can return multiple values using a list.


Answer: False (It returns them as a tuple)


Q4. The statements after a return statement in a function are not executed.


Answer: True


Q5. Local variables in a function remain accessible outside the function.


Answer: False


5. Match the Following Questions.


Q1. Match the following.


Questions Answer
1. def (A) Used to define a function
2. return (B) Used to send value back from function
3. local variable (C) Exists only inside a function
4. math module (D) Provides sqrt(), ceil(), floor()
5. argument (E) Value supplied at the time of function call

Answer: 1 - A, 2 - B, 3 - C, 4 - D, 5 - E


Why Understanding Functions in Computer Science Matters for CBSE Class 11?

Learning about functions and their applications is key for students aiming to score well in exams. This page covers Important questions class 11 computer science chapter 7 functions with clear, stepwise answers to build understanding and exam confidence.


You will find Important questions class 11 computer science chapter 7 functions with answers in MCQ, VSA, and descriptive formats. These reflect the types of questions frequently asked in CBSE 2025-26, focusing on concept clarity and Python skills.


Students can also get the Class 11 Computer Science functions important questions pdf or browse chapter-wise PDFs for structured preparation and success in CBSE exams.

FAQs on Important Questions and Answers for Class 11 Computer Science Chapter 7 Functions 2025-26

1. What are the important topics in computer science class 11?

For Class 11 Computer Science, focus on functions in Python, types of functions, parameters vs. arguments, return values, and scope rules. Practice important questions class 11 computer science chapter 7 functions MCQ and short-long answers from NCERT to cover subtopics likely asked in exams.

2. What are the major functions of the computer system class 11?

The major functions include input, processing, output, and storage. In Chapter 7, learn how functions in programming help organise tasks, reuse code, and simplify logic, connecting these computer system basics to Python coding with examples from important questions.

3. What is function class 11 computer science?

A function is a named block of code that performs a specific task and can be reused. For exams, know how to define, call, and pass parameters in Python functions. Remember to cover examples given in important questions class 11 computer science chapter 7 functions.

4. What are the functions of Python class 11?

In Python for Class 11, functions help structure programs, accept inputs, return results, and break complex problems into smaller tasks. Prepare by solving important questions with answers from the chapter for both user-defined and built-in functions, as asked in CBSE exams.

5. How can I find important questions class 11 computer science chapter 7 functions with answers?

You can access important questions class 11 computer science chapter 7 functions with answers in NCERT notes, worksheets, and PDFs. Review solved examples for all question types—MCQs, short, long, and case-based—to match the latest CBSE exam pattern.

6. How should I prepare for important questions class 11 computer science chapter 7 functions mcq?

Start by revising the key concepts, definitions, and syntax related to functions in Python. Practice with sample MCQs from previous years and chapter worksheets. Check the answer explanations to learn the logic, as in most important questions for Class 11 Computer Science Functions.

7. Where can I get a PDF of important questions class 11 computer science chapter 7 functions?

You can download a Class 11 Computer Science functions important questions PDF from Vedantu's resources. These PDFs include important questions class 11 computer science chapter 7 functions with answers, MCQs, and short and long answers for focused CBSE revision offline.