Humanities/Arts Exam  >  Humanities/Arts Notes  >  Computer Science for Class 12  >  Detailed Notes: Functions

Detailed Notes: Functions | Computer Science for Class 12 - Humanities/Arts PDF Download

Download, print and study this document offline
Please wait while the PDF view is loading
 Page 2


Introduction 
? Large programs are often difficult to manage, thus 
large programs are divided into smaller units known as 
functions. 
? It is simply a group of statements under any name i.e. 
function name and can be invoked (call) from other part 
of program. 
? Take an example of School Management Software, now 
this software will contain various tasks like Registering 
student, Fee collection, Library book issue, TC 
generation, Result Declaration etc. In this case we have 
to create different functions for each task to manage 
the software development. 
Page 3


Introduction 
? Large programs are often difficult to manage, thus 
large programs are divided into smaller units known as 
functions. 
? It is simply a group of statements under any name i.e. 
function name and can be invoked (call) from other part 
of program. 
? Take an example of School Management Software, now 
this software will contain various tasks like Registering 
student, Fee collection, Library book issue, TC 
generation, Result Declaration etc. In this case we have 
to create different functions for each task to manage 
the software development. 
Introduction 
? Set of functions is stored in a file called MODULE. 
And this approach is known as MODULARIZATION, 
makes program easier to understand, test and 
maintain.  
? Commonly used modules that contain source code 
for generic need are called LIBRARIES. 
? Modules contains set of functions. Functions is of 
mainly two types: 
? Built-in Functions 
? User-Defined Functions 
Page 4


Introduction 
? Large programs are often difficult to manage, thus 
large programs are divided into smaller units known as 
functions. 
? It is simply a group of statements under any name i.e. 
function name and can be invoked (call) from other part 
of program. 
? Take an example of School Management Software, now 
this software will contain various tasks like Registering 
student, Fee collection, Library book issue, TC 
generation, Result Declaration etc. In this case we have 
to create different functions for each task to manage 
the software development. 
Introduction 
? Set of functions is stored in a file called MODULE. 
And this approach is known as MODULARIZATION, 
makes program easier to understand, test and 
maintain.  
? Commonly used modules that contain source code 
for generic need are called LIBRARIES. 
? Modules contains set of functions. Functions is of 
mainly two types: 
? Built-in Functions 
? User-Defined Functions 
Advantages of Function 
? PROGRAM HANDLING EASIER : only small part of the 
program is dealt with at a time. 
? REDUCED LoC: as with function the common set of code 
is written only once and can be called from any part of 
program, so it reduces Line of Code 
? EASY UPDATING : if function is not used then set of 
code is to be repeated everywhere it is required. 
Hence if we want to change in any formula/expression 
then we have to make changes to every place, if 
forgotten then output will be not the desired output. 
With function we have to make changes to only one 
location. 
Page 5


Introduction 
? Large programs are often difficult to manage, thus 
large programs are divided into smaller units known as 
functions. 
? It is simply a group of statements under any name i.e. 
function name and can be invoked (call) from other part 
of program. 
? Take an example of School Management Software, now 
this software will contain various tasks like Registering 
student, Fee collection, Library book issue, TC 
generation, Result Declaration etc. In this case we have 
to create different functions for each task to manage 
the software development. 
Introduction 
? Set of functions is stored in a file called MODULE. 
And this approach is known as MODULARIZATION, 
makes program easier to understand, test and 
maintain.  
? Commonly used modules that contain source code 
for generic need are called LIBRARIES. 
? Modules contains set of functions. Functions is of 
mainly two types: 
? Built-in Functions 
? User-Defined Functions 
Advantages of Function 
? PROGRAM HANDLING EASIER : only small part of the 
program is dealt with at a time. 
? REDUCED LoC: as with function the common set of code 
is written only once and can be called from any part of 
program, so it reduces Line of Code 
? EASY UPDATING : if function is not used then set of 
code is to be repeated everywhere it is required. 
Hence if we want to change in any formula/expression 
then we have to make changes to every place, if 
forgotten then output will be not the desired output. 
With function we have to make changes to only one 
location. 
User Defined Functions 
? A function is a set of statements that performs a specific 
task; a common structuring elements that allows you to 
use a piece of code repeatedly in different part of 
program.  Functions are also known as sub-routine, 
methods, procedure or subprogram. 
? Syntax to create USER DEFINED FUNCTION 
def function_name([comma separated list of parameters]): 
 statements…. 
 statements…. 
KEYWORD 
FUNCTION DEFINITION 
Read More
1 videos|26 docs|18 tests

Top Courses for Humanities/Arts

1 videos|26 docs|18 tests
Download as PDF
Explore Courses for Humanities/Arts exam

Top Courses for Humanities/Arts

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

Semester Notes

,

Detailed Notes: Functions | Computer Science for Class 12 - Humanities/Arts

,

practice quizzes

,

Detailed Notes: Functions | Computer Science for Class 12 - Humanities/Arts

,

Important questions

,

ppt

,

pdf

,

Sample Paper

,

Exam

,

Viva Questions

,

Detailed Notes: Functions | Computer Science for Class 12 - Humanities/Arts

,

Summary

,

mock tests for examination

,

shortcuts and tricks

,

MCQs

,

Previous Year Questions with Solutions

,

past year papers

,

video lectures

,

Free

,

Objective type Questions

,

Extra Questions

,

study material

;