CBSE Class 12 Computer Science Functions Worksheet Set A

Read and download free pdf of CBSE Class 12 Computer Science Functions Worksheet Set A. Download printable Computer Science Class 12 Worksheets in pdf format, CBSE Class 12 Computer Science Functions Worksheet has been prepared as per the latest syllabus and exam pattern issued by CBSE, NCERT and KVS. Also download free pdf Computer Science Class 12 Assignments and practice them daily to get better marks in tests and exams for Class 12. Free chapter wise worksheets with answers have been designed by Class 12 teachers as per latest examination pattern

Functions Computer Science Worksheet for Class 12

Class 12 Computer Science students should refer to the following printable worksheet in Pdf in Class 12. This test paper with questions and solutions for Class 12 Computer Science will be very useful for tests and exams and help you to score better marks

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

 

CBSE Class 12 Computer Science Functions Worksheet Set A 1

CBSE Class 12 Computer Science Functions Worksheet Set A 2

 

Please click on below link to download CBSE Class 12 Computer Science Functions Worksheet Set A

Practice Worksheets Class 12 Computer Science
CBSE Class 12 Computer Science All Chapters Worksheet
CBSE Class 12 Computer Science Arrays Worksheet
CBSE Class 12 Computer Science Binary Files Worksheet
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 Computer Networks Worksheet Set A
CBSE Class 12 Computer Science Computer Networks Worksheet Set B
CBSE Class 12 Computer Science Computer Networks Worksheet Set C
CBSE Class 12 Computer Science Constructor And Destructor Worksheet Set A
CBSE Class 12 Computer Science Constructor And Destructor Worksheet Set A
CBSE Class 12 Computer Science Constructor And Destructor Worksheet Set B
CBSE Class 12 Computer Science Data Base Concept Worksheet
CBSE Class 12 Computer Science Data File Handling Worksheet
CBSE Class 12 Computer Science Data Management Worksheet Set A
CBSE Class 12 Computer Science Data Management Worksheet Set B
CBSE Class 12 Computer Science Data Management Worksheet Set C
CBSE Class 12 Computer Science Data Management Worksheet Set D
CBSE Class 12 Computer Science Data Management Worksheet Set E
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 Header Files Worksheet
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 Pointers Worksheet
CBSE Class 12 Computer Science Programming and Computational Thinking Worksheet Set A
CBSE Class 12 Computer Science Programming and Computational Thinking Worksheet Set B
CBSE Class 12 Computer Science Programming and Computational Thinking Worksheet Set C
CBSE Class 12 Computer Science Programming and Computational Thinking Worksheet Set D
CBSE Class 12 Computer Science Programming and Computational Thinking Worksheet Set E
CBSE Class 12 Computer Science Programming and Computational Thinking Worksheet Set F
CBSE Class 12 Computer Science Python Worksheet
CBSE Class 12 Computer Science Recursion Worksheet
CBSE Class 12 Computer Science Revision Worksheet
CBSE Class 12 Computer Science Society Law and Ethics Worksheet Set A
CBSE Class 12 Computer Science Society Law and Ethics Worksheet Set B
CBSE Class 12 Computer Science Society Law and Ethics Worksheet Set C
CBSE Class 12 Computer Science Society Law and Ethics Worksheet Set D
CBSE Class 12 Computer Science Society Law and Ethics Worksheet Set E
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
CBSE Class 12 Computer Science Worksheet Set A Solved
CBSE Class 12 Computer Science Worksheet Set B Solved
CBSE Class 12 Computer Science Worksheet Set C Solved
CBSE Class 12 Computer Science Worksheet Set D Solved
CBSE Class 12 Computer Science Worksheet Set E Solved
CBSE Class 12 Computer Science Worksheet Set F Solved

CBSE Class 12 Computer Science Functions Worksheet

The above practice worksheet for Functions has been designed as per the current syllabus for Class 12 Computer Science released by CBSE. Students studying in Class 12 can easily download in Pdf format and practice the questions and answers given in the above practice worksheet for Class 12 Computer Science on a daily basis. All the latest practice worksheets with solutions have been developed for Computer Science by referring to the most important and regularly asked topics that the students should learn and practice to get better scores in their examinations. Studiestoday is the best portal for Printable Worksheets for Class 12 Computer Science students to get all the latest study material free of cost.

Worksheet for Computer Science CBSE Class 12 Functions

Teachers of studiestoday have referred to the NCERT book for Class 12 Computer Science to develop the Computer Science Class 12 worksheet. If you download the practice worksheet for the above chapter daily, you will get better scores in Class 12 exams this year as you will have stronger concepts. Daily questions practice of Computer Science printable worksheet and its study material will help students to have a stronger understanding of all concepts and also make them experts on all scoring topics. You can easily download and save all revision Worksheets for Class 12 Computer Science also from www.studiestoday.com without paying anything in Pdf format. After solving the questions given in the practice sheet which have been developed as per the latest course books also refer to the NCERT solutions for Class 12 Computer Science designed by our teachers

Functions worksheet Computer Science CBSE Class 12

All practice paper sheet given above for Class 12 Computer Science have been made as per the latest syllabus and books issued for the current academic year. The students of Class 12 can be assured that the answers have been also provided by our teachers for all test paper of Computer Science so that you are able to solve the problems and then compare your answers with the solutions provided by us. We have also provided a lot of MCQ questions for Class 12 Computer Science in the worksheet so that you can solve questions relating to all topics given in each chapter. All study material for Class 12 Computer Science students have been given on studiestoday.

Functions CBSE Class 12 Computer Science Worksheet

Regular printable worksheet practice helps to gain more practice in solving questions to obtain a more comprehensive understanding of Functions concepts. Practice worksheets play an important role in developing an understanding of Functions in CBSE Class 12. Students can download and save or print all the printable worksheets, assignments, and practice sheets of the above chapter in Class 12 Computer Science in Pdf format from studiestoday. You can print or read them online on your computer or mobile or any other device. After solving these you should also refer to Class 12 Computer Science MCQ Test for the same chapter.

Worksheet for CBSE Computer Science Class 12 Functions

CBSE Class 12 Computer Science best textbooks have been used for writing the problems given in the above worksheet. If you have tests coming up then you should revise all concepts relating to Functions and then take out a print of the above practice sheet and attempt all problems. We have also provided a lot of other Worksheets for Class 12 Computer Science which you can use to further make yourself better in Computer Science

Where can I download latest CBSE Practice worksheets for Class 12 Computer Science Functions

You can download the CBSE Practice worksheets for Class 12 Computer Science Functions for the latest session from StudiesToday.com

Can I download the Practice worksheets of Class 12 Computer Science Functions in Pdf

Yes, you can click on the links above and download chapter-wise Practice worksheets in PDFs for Class 12 for Computer Science Functions

Are the Class 12 Computer Science Functions Practice worksheets available for the latest session

Yes, the Practice worksheets issued for Functions Class 12 Computer Science have been made available here for the latest academic session

How can I download the Functions Class 12 Computer Science Practice worksheets

You can easily access the links above and download the Class 12 Practice worksheets Computer Science for Functions

Is there any charge for the Practice worksheets for Class 12 Computer Science Functions

There is no charge for the Practice worksheets for Class 12 CBSE Computer Science Functions you can download everything free

How can I improve my scores by solving questions given in Practice worksheets in Functions Class 12 Computer Science

Regular revision of practice worksheets given on studiestoday for Class 12 subject Computer Science Functions can help you to score better marks in exams

Are there any websites that offer free Practice test papers for Class 12 Computer Science Functions

Yes, studiestoday.com provides all the latest Class 12 Computer Science Functions test practice sheets with answers based on the latest books for the current academic session

Can test sheet papers for Functions Class 12 Computer Science be accessed on mobile devices

Yes, studiestoday provides worksheets in Pdf for Functions Class 12 Computer Science in mobile-friendly format and can be accessed on smartphones and tablets.

Are practice worksheets for Class 12 Computer Science Functions available in multiple languages

Yes, practice worksheets for Class 12 Computer Science Functions are available in multiple languages, including English, Hindi