Download the app to get CBSE Sample Papers 2023-24, NCERT Solutions (Revised), Most Important Questions, Previous Year Question Bank, Mock Tests, and Detailed Notes.Install Now
Class 12 Computer Science Notes Python Advanced Programming – in PDF
Python Advanced Programming class 12 Notes Computer Science in PDF are available for free download in myCBSEguide mobile app. The best app for CBSE students now provides Python Advanced Programming class 12 Notes Computer Science latest chapter wise notes for quick preparation of CBSE board exams and school-based annual examinations. Class 12 Computer Science notes on chapter 1 Python Advanced Programming Computer Science are also available for download in CBSE Guide website.
Revision notes for Class 12 Computer Science Chapter 1 Python Advanced Programming
Download CBSE class 12th revision notes for chapter 1 Python Advanced Programming in PDF format for free. Download revision notes for Python Advanced Programming class 12 Notes Computer Science and score high in exams. These are the Python Advanced Programming class 12 Notes Computer Science prepared by team of expert teachers. The revision notes help you revise the whole chapter 1 in minutes. Revision notes in exam days is one of the best tips recommended by teachers during exam days.
Python Advanced Programming class 12 Notes Computer Science
Interactive Mode: Interactive Mode, as the name suggests, allows us to interact with OS.
Script Mode: In script mode, we type Python program in a file and then use interpreter to execute the content of the file.
Number: Number data type stores Numerical Values.
Sequence: A sequence is an ordered collection of items, indexed by positive integers.
Arithmetic operators: +, -, *, /, %, ** and //.
Relational operators: <, <=, >, >=, != or <> and ==.
Logical operators: or, and, and not
Assignment Operator: =, +=, -=, *=, /=, %=, **= and //=
Functions in Python: A function is named sequence of statement(s) that performs a computation.
Module: A module is a file containing Python definitions (i.e. functions) and statements. Standard library
of Python is extended as module(s) to a Programmer.
String: In python, consecutive sequence of characters is known as a string. An individual character in a string is accessed using a subscript (index).
List: Like a string, list is a sequence of values. List can be of any type.
Dictionaries: A dictionary is like a list, but more in general. In a list, index value is an integer, while in a dictionary index value can be any other data type and are called keys.
Tuples: A tuple is a sequence of values, which can be of any type and they are indexed by integer.
(Concept of Object Oriented Programming)
Object: clearly defines an entity in terms of its properties and behaviour.
Class: a blueprint of an object.
Encapsulation: combining of data and the functions associated with that data in a single unit
Data Hiding: the mechanism of hiding the data of a class from the outside world
Abstraction: providing only essential information to the outside world and hiding their background details
Inheritance: forming a new class (derived class) from an existing class (called the base class).
Polymorphism: ability to use an operator or function in various forms.
Static Binding: the linking of function call to the function definition is done during compilation of the program.
Dynamic Binding: the linking of function call to the function definition is done during the execution of the program.
(Classes in Python)
Namespace: A mapping from names to objects. Examples of namespaces are built-in names, global names in a module and local names in function invocation
Scope: A region of Python program where a namespace is directly accessible.
In Python a name, storing any type of data, can refer to only one thing at a time.
The scope of a variable is its enclosing function, class or file.
The names always belong to the namespace where they are bound.
Names declared with global keyword have to be referred at the file level.
LEGB rule: when a name is encountered during the execution of the program, it searches for that name in the following order:
L. Local – It first makes a local search i.e. in current def statement.
E. Enclosing functions – It searches in all enclosing functions, form inner to outer.
G. Global (module) – It searches for global modules or for names declared global
B. Built-in (Python) – Finally it checks for any built in functions in Python.
Class definitions should be given before it is referenced.
__init__ is a special method used to initialize the members of a class.
self is the first argument that is passed to the methods of a class.
A class object can be used in two ways – Instantiation and Attribute reference Class attributes belong to the class and will be shared by all instances Instance attributes belong to a particular instance of a class only.
The attributes – data and methods can be added to the class dynamically.
getattr(obj, name,[ default]): is used to access the attribute of the object
hasattr(obj, name): is used to check if an attribute exists or not
setattr(obj,name,value): is used to set an attribute with a value.
delattr(obj,name) : is used to delete an attribute
__dict_ _: gives the dictionary containing class namespace
__doc__: returns the docstring of a class
__name__: it gives the class name
__module__: specifies the module name in which the class is defined
__bases__: it gives a tuple containing base classes
__del__: is invoked when the module is being deleted
__str__: returns the string representation of the objects Private variables can only be accessed from inside the objects.
Name Mangling: A name is prefixed with two leading underscores and no more than one trailing underscore.
Static Method: is a method that does not obey the usual convention in which self, an instance of the class, is the first argument to the method.
Python uses two strategies for memory allocation- Reference counting and Automatic garbage collection.
Reference Counting: works by counting the number of times an object is referenced by other objects in the system. When an object’s reference count reaches zero, Python collects it automatically.
Automatic Garbage Collection: Python schedules garbage collection based upon a threshold of object allocations and object de-allocations. Whe the number of allocations minus the number of deallocations are greater than the threshold number, the garbage collector is run and the unused block of memory is reclaimed.
Inheritance: In object-oriented programming, inheritance is a mechanism in which a new class is derived from an already defined class. The derived class is known as a subclass or a child class. The pre-existing class is known as base class or a parent class or a superclass.
Single Inheritance: In single inheritance, a subclass is derived from a single base class.
Multilevel Inheritance: In multilevel inheritance, the derived class becomes the base of another class.
Multiple Inheritance: In this type of inheritance, the derived class inherits from one or more base classes.
Hierarchical Inheritance: In this type of inheritance, the base class is inherited by more than one class.
Hybrid Inheritance: This inheritance is a combination of multiple, hierarchical and multilevel inheritance.
Overriding Methods: The feature of overriding methods enables the programmer to provide specific implementation to a method in the subclass which is already implemented in the superclass.
Abstract Methods: An abstract method is a method declared in a parent class, but not implemented in it. The implementation of such a method can be given in the derived class.
CBSE Class 12 Revision Notes and Key Points
Python Advanced Programming class 12 Notes Computer Science. CBSE quick revision note for class-12 Computer Science, Chemistry, Math’s, Biology and other subject are very helpful to revise the whole syllabus during exam days. The revision notes covers all important formulas and concepts given in the chapter. Even if you wish to have an overview of a chapter, quick revision notes are here to do if for you. These notes will certainly save your time during stressful exam days.
- Business Studies
- Computer Science
- Informatics Practices
- English Core
- Physical Education
To download Python Advanced Programming class 12 Notes Computer Science, sample paper for class 12 Physics, Chemistry, Biology, History, Computer Science, Economics, Computer Science, Computer Science, Home Science, Accountancy, Computer Science and Home Science; do check myCBSEguide app or website. myCBSEguide provides sample papers with solution, test papers for chapter-wise practice, NCERT solutions, NCERT Exemplar solutions, quick revision notes for ready reference, CBSE guess papers and CBSE important question papers. Sample Paper all are made available through the best app for CBSE students
Create question paper PDF and online tests with your own name & logo in minutes.Create Now
Question Bank, Mock Tests, Exam Papers, NCERT Solutions, Sample Papers, NotesInstall Now