About 43,600 results
Open links in new tab
  1. Photo by Pybeginners on March 17, 2025. May be a graphic of text that says 'A function is Functions in Python set of commands that can be reused and executed as a unit. It may or may not return a result. Function name The function identifier Arguments List of values passed to the function def function_name(arguments): function statement statement return value Function body Executed whenever the function is called Return value Sends value (data) back to the program Functions help to: Avoid repetitive code •Improve readability Make it easier to fix errors @pybeginners Pybeginners www.usandopy.com'.
    In Class 12 Computer Science, functions are essential programming constructs that allow for code reusability, modularity, and organization.

    What is a Function?

    A function is a named block of code designed to perform a specific task. Functions help break down complex problems into smaller, manageable parts, making programs easier to read and maintain. They can accept inputs (known as parameters) and return outputs (values) after processing the inputs.

    Types of Functions

    1. User-defined Functions: Programmers can create their own functions to perform specific tasks. This is done using the def keyword followed by the function name and parameters. For example:
    2. 2 Sources
    def greet(name):
    return "Hello, " + name
    

    Structure of a Function

    A function typically consists of the following parts:
    • Function Header: This includes the def keyword, the function name, and parameters. For example:
    def add(a, b):
    

    Importance of Functions

    Example of a Function in Python

    Here’s a simple example of a user-defined function in Python:
    def calculate_area(radius):
    area = 3.14 * radius * radius
    return area
    # Calling the function
    print(calculate_area(5))  # Output: 78.5
    
    In this example, the function calculate_area takes a radius as input and returns the area of a circle.

    Conclusion

  2. Functions - NCERT

    • Page Count: 32
    • File Size: 2MB
    In programming, the use of function is one of the means to achieve modularity and reusability. Function can be defined as a named group of instructions that accomplish a specific task when it is invoked.
    Suppose in further the company decides to design another type of tent whose base is rectangular, while the upper part remains the same. In such a scenario, some part of th…
    7.3 USER DEFINED FUNCTIONS

    Taking advantage of reusability feature of functions, there is a large number of functions already available in Python under standard library (section 7.5). We can directly call these functions in our program without defining them. However, in additio…

    7.3.4 Flow of Execution

    Flow of execution can be defined as the order in which the statements in a program are executed. The Python interpreter starts executing the instructions in a program from the first statement. The statements are executed one by one, in the order of a…

    (A) Global Variable

    In Python, a variable that is defined outside any function or any block is known as a global variable. It can be accessed in any functions defined onwards. Any change made to the global variable will impact all the functions in the program where that v…

    (B) Local Variable

    A variable that is defined inside any function or a block is known as a local variable. It can be accessed only in the function or a block where it is defined. It exists only till the function executes.

  3. Class 12 Functions: Comprehensive Notes | PDF - Scribd

    This document provides comprehensive notes on functions in computer science, covering their definition, types, syntax, and key concepts such as parameters, return statements, and recursion.

  4. Chapter Functions for grade 12 computer Science | PDF

    A function is a block of code that performs a specific task and can be called anywhere in a program. Functions make code reusable, improve modularity, and …

  5. Functions Chapter Notes - Computer Science for Grade 12

    Mar 24, 2026 · Full syllabus notes, lecture & questions for Functions Chapter Notes - Computer Science for Grade 12 - Grade 12 | Plus exercises question with solution to help you revise complete syllabus …

  6. Computer Science Class 12 Functions Notes - CBSE Skill Education

    Jan 5, 2025 · Working with Functions in Python Class 12 Notes: When a single program is divided into small units, it is known as a function. A function is reusable code, meaning the same function can be …

  7. Chapter 3: Working with Functions | Solutions of …

    Get answers to all exercises of Chapter 3: Working with Functions Sumita Arora Computer Science with Python CBSE Class 12 book. Clear your computer doubts …

  8. Working with Functions - CBSE Computer Science Class 12

    On this page, you'll find everything you need to master Working with Functions. The CBSE-style Question Bank provides exam-style practice questions with detailed, step-by-step solutions.

  9. Chapter 02 functions -class xii | PPTX - SlideShare

    There are three types of functions: built-in functions, modules, and user-defined functions. User-defined functions are created using the def keyword and can take …

  10. Chapter 14 - Computer Science - Class 12 - Teachoo

    By studying this chapter, ...

  11. NCERT Books Class 12 Computer Science PDF

    The NCERT Books for Class 12 Computer Science PDF lay a strong foundation in programming, data management, and cyber ethics while keeping examples simple …