Access the latest CBSE Class 12 Computer Science Functions Worksheet Set A. We have provided free printable Class 12 Computer Science worksheets in PDF format, specifically designed for Functions. These practice sets are prepared by expert teachers following the 2025-26 syllabus and exam patterns issued by CBSE, NCERT, and KVS.
Functions Computer Science Practice Worksheet for Class 12
Students should use these Class 12 Computer Science chapter-wise worksheets for daily practice to improve their conceptual understanding. This detailed test papers include important questions and solutions for Functions, to help you prepare for school tests and final examination. Regular practice of these Class 12 Computer Science questions will help improve your problem-solving speed and exam accuracy for the 2026 session.
Download Class 12 Computer Science Functions Worksheet PDF
1. A function can be defined as the organised block of reusable code, which can be called whenever required. It is basically named unit of a group of proper statements.
2. Types of Python Function There are three types of functions in Python, which are given below
(i) Built-in Function Built-in functions are known as library functions. These are pre-defined functions in Python programming system that are always available for use.
e.g. type(), input(), print() etc.
(ii) User Defined Functions Python provides facility for programmers to define their own functions according to their requirements. Those functions defined by programmers are known as user defined functions.
e.g. Function for finding factorial, function for checking whether a number is prime or not, etc.
(iii) Function Defined in Modules In Python, there are some functions that are pre-defined in specific modules. e.g. sin(), cos() are contained in math module, mean(), mode() are in statistics module etc.
3. Defining a Function Function contain ‘def ’ keyword to provide the required functionality. The def keyword is followed by the function name and parentheses ().
Any input parameters or arguments should be placed within these parentheses.
There is a colon (:) at the end of def line.
4. Calling a Function Function definition part only define the name of function and specify the parameters.
Function can be called multiple times with different expressions as the actual parameters.
5. Parameters and Arguments A parameter is a variable used to define a particular value during a function definition.
An argument is a value passed to the function during the function call which is received for corresponding parameter defined in function header.
6. Passing Parameters
• Default Parameter Values It instructs the compiler what value to pass for a parameter if the programmer deliberately misses the matching argument of that parameter in the function call statement.
• Keyword (Named) Arguments Using keyword argument, you can declare value using name.
Python provides a way of writing function calls where you can write any argument in any order, but value should be in right form.
• Positional Arguments Positional arguments are arguments that need to be included in the proper position or order.
The first position argument always needs to be listed first when the function is called. The second positional argument needs to be listed second and the third positional argument listed third etc.
7. Returning Values from Functions
• Functions Returning Some Value (Non-void Functions) This function is used to create a specific task. After completion that task it returns some result in term of value. Non-void functions are also known as fruitful functions. Non-void function can return value in various form. Syntax return < value>
• Functions not Returning Any Value (Void Functions) When a function does not return a value, we can say it is a void function. Void functions are also known as non-fruitful functions. Methods in Python do not return any value.
8. Scope of Variables A variable defined inside a function cannot be accessed outside it.
Scope of variables in Python program, shows the area where you can use it. The variables are treated differently in different functions.
There are two kinds of scope of variable in Python, which are described below:
(i) Local Variable (Local Scope) A variable that is defined inside any function or a block is known as a local variable.
Any other function of the program cannot use them without receiving as the argument.
(ii) Global Variable (Global Scope) A variable declared outside of all functions in a program has global scope and is known as global variable.
Global variable is usable for all functions of Python program without declaration in their body or without receiving as the arguments.
9. Namespace A namespace is basically a system to make sure that all the names in a program are unique and can be used without any conflict. Python implements namespaces as dictionaries. In Python, the LEGB (Local, Enclosed, Global, Built-in) rule is used to decide the order in which the namespaces are to be searched for scope resolution.
Direction (Q. Nos. 1-15) Each of the question has four options out of which only one is correct.
Select the correct option as your answer.
1. Which is/are the advantage(s) of functions in Python?
(a) Reducing duplication of code
(b) Decomposing complex problems into simpler pieces
(c) Improving clarity of the code
(d) All of the mentioned
Answer : D
2. None will return by function when
(a) return statement is not used inside a function
(b) return statement is used inside a function
(c) Both (a) and (b)
(d) None of the above
Answer : A
3. Zero or more keyword arguments can be passed to a function in a
(a) double function call
(b) any function call
(c) single function call
(d) None of these
Answer : C
4. Which of the following function headers is correct?
(a) def myFunc(x = 2, y = 3, z):
(b) def myFunc(x = 2, y, z = 3):
(c) def myFunc(x, y = 2, z = 3):
(d) def myFunc(x, y, z = 3, p):
Answer : C
5. Which one of the following is the correct way of calling a function?
(a) function_name()
(b) call function_name()
(c) ret function_name()
(d) function function_name()
Answer : A
6. Required arguments are the arguments passed to a function in
(a) any positional order
(b) correct positional order
(c) odd positional order
(d) even positional order
Answer : B
7. Suppose there is a list such that: list1=[1,2,3]. If we want to print this list in reverse order, which of the following methods should be used?
(a) reverse(list1)
(b) list(reverse[(list1)])
(c) reversed(list1)
(d) list(reversed(list1))
Answer : D
8. What is the output of following code?
def test():
a=96
print(a)
a =+ 2
test()
(a) 96
(b) 98
(c) 94
(d) Error
Answer : A
9. What will be the output of following code?
def test(i):
i = [3]
num = [9]
test(num)
print(num)
(a) [3]
(b) [9]
(c) [9, 3]
(d) [3, 9]
Answer : B
10. What is the output of following code?
val=5
def test():
global val
val=val+1
test()
val
(a) 6
(b) 5
(c) 4
(d) Error
Answer : A
11. Identify the output of following code.
def Func(hello, num):
while(num > 0):
print(hello)
num − =1
Func(‘A’,4)
(a) AAA
(b) AAAA
(c) Error
(d) Infinite loop
Answer : D
12. What is the output of following code?
def func(x):
x = x + [15]
res = [11, 12, 13, 14]
func(res)
print(len(res))
(a) 5
(b) 4
(c) 3
(d) Error
Answer : B
13. What is the output of following code?
def myFun(a, b):
def myFun1(c, d):
return c + d
return myFun1(a, b)
return a
result = myFun(12, 13)
print(result)
(a) 13
(b) 25
(c) (12, 25)
(d) Error
Answer : B
14. What is the output of following code?
def test(x = 2, y = 1):
x = x*y + 1
y = y* 2 − x
print(x, y)
test(y = 5, x = 3)
(a) 16 6
(b) 16 − 6
(c) − 16 6
(d) 15 8
Answer : B
15. What is the output of following code?
def find():
l=“HELLO”
j=“ ”
l1=[]
count=1
for i in l:
if i in [‘a’, ‘e’, ‘i’, ‘o’, ‘u’]:
j=j+i.swapcase()
else:
if(count%2 !=0):
j=j+str(len(l[:count]))
else:
j=j+i
count=count+1
print(j)
find()
(a) H2LL5
(b) H2L45
(c) 1E3L5
(d) Error
Answer : C
Please click on below link to download CBSE Class 12 Computer Science Functions Worksheet Set A
| CBSE Class 12 Computer Science Boolean Algebra Worksheet |
| CBSE Class 12 Computer Science C++ Worksheet Set A |
| CBSE Class 12 Computer Science C++ Worksheet Set B |
| CBSE Class 12 Computer Science Classes And Objects Worksheet |
| CBSE Class 12 Computer Science Communication Technology Worksheet |
| CBSE Class 12 Computer Science Data Base Concept Worksheet |
| CBSE Class 12 Computer Science Data File Handling Worksheet |
| CBSE Class 12 Computer Science File Handling Worksheet Set A |
| CBSE Class 12 Computer Science File Handling Worksheet Set B |
| CBSE Class 12 Computer Science File Handling Worksheet Set C |
| CBSE Class 12 Computer Science Function In Python Program Worksheet |
| CBSE Class 12 Computer Science Functions Worksheet Set A |
| CBSE Class 12 Computer Science Functions Worksheet Set B |
| CBSE Class 12 Computer Science Implementation of Queue Worksheet Set A |
| CBSE Class 12 Computer Science Implementation of Queue Worksheet Set B |
| CBSE Class 12 Computer Science Implementation of Stack Worksheet |
| CBSE Class 12 Computer Science Inheritance Worksheet Set A |
| CBSE Class 12 Computer Science Inheritance Worksheet Set B |
| CBSE Class 12 Computer Science Sql Worksheet Set A |
| CBSE Class 12 Computer Science Sql Worksheet Set B |
| CBSE Class 12 Computer Science Using Python Libraries Worksheet |
Important Practice Resources for Class 12 Computer Science
Functions CBSE Class 12 Computer Science Worksheet
Students can use the Functions practice sheet provided above to prepare for their upcoming school tests. This solved questions and answers follow the latest CBSE syllabus for Class 12 Computer Science. You can easily download the PDF format and solve these questions every day to improve your marks. Our expert teachers have made these from the most important topics that are always asked in your exams to help you get more marks in exams.
NCERT Based Questions and Solutions for Functions
Our expert team has used the official NCERT book for Class 12 Computer Science to create this practice material for students. After solving the questions our teachers have also suggested to study the NCERT solutions which will help you to understand the best way to solve problems in Computer Science. You can get all this study material for free on studiestoday.com.
Extra Practice for Computer Science
To get the best results in Class 12, students should try the Computer Science MCQ Test for this chapter. We have also provided printable assignments for Class 12 Computer Science on our website. Regular practice will help you feel more confident and get higher marks in CBSE examinations.
You can download the teacher-verified PDF for CBSE Class 12 Computer Science Functions Worksheet Set A from StudiesToday.com. These practice sheets for Class 12 Computer Science are designed as per the latest CBSE academic session.
Yes, our CBSE Class 12 Computer Science Functions Worksheet Set A includes a variety of questions like Case-based studies, Assertion-Reasoning, and MCQs as per the 50% competency-based weightage in the latest curriculum for Class 12.
Yes, we have provided detailed solutions for CBSE Class 12 Computer Science Functions Worksheet Set A to help Class 12 and follow the official CBSE marking scheme.
Daily practice with these Computer Science worksheets helps in identifying understanding gaps. It also improves question solving speed and ensures that Class 12 students get more marks in CBSE exams.
All our Class 12 Computer Science practice test papers and worksheets are available for free download in mobile-friendly PDF format. You can access CBSE Class 12 Computer Science Functions Worksheet Set A without any registration.