Python Programming


SYLLABUS

UNIT-I

INTRODUCTION TO PYTHON: History of Python, Need of Python Programming, Applications Basics of Python Programming Using the REPL(Shell), Running Python Scripts, Variables, Assignment, Keywords, Input-Output, Indentation. Types, Operators and Expressions: Types - Integers, Strings, Booleans; Operators- Arithmetic Operators, Comparison (Relational) Operators, Assignment Operators, Logical Operators, Bitwise Operators, Membership Operators, Identity Operators, Expressions and order of evaluations. Control Flow-: if, if-elif-else, for, while, break, continue, pass.

UNIT-II

STRINGS and DATA STRUCTURES: Strings: Strings and text files, String manipulations: subscript operator, indexing, slicing a string; strings and number system: converting strings to numbers and vice versa. Binary, octal, hexadecimal numbers, Data Structures: Lists, tuples, and dictionaries; basic list 102 operators, replacing, inserting, removing an element; searching and sorting lists; dictionary literals, adding and removing keys, accessing and replacing values; traversing dictionaries.

UNIT-III

FUNCTIONS: Defining Functions, Calling Functions, Passing Arguments, Keyword Arguments, Default Arguments, Variable-length arguments, Anonymous Functions, Fruitful Functions (Function Returning Values), Scope of the Variables in a Function - Global and Local Variables. Modules: Creating modules, import statement, from, name spacing, Python packages Introduction to PIP, Installing Packages via PIP, Using Python Packages.

UNIT-IV

INTRODUCTION TO OOPS: Classes and Objects: Introduction, classes and objects, class method and self-argument, init() method, class and object variables, del() method, other special methods, public and private data members, private methods, calling a class method from another class method, built-in class attributes, garbage collection, class and static methods, Inheritance: Introduction, inheriting classes in python, types of inheritance, composition/containership/complex objects, abstract classes and interfaces, Meta class.

UNIT-V

OPERATOR OVERLOADING AND EXCEPTION HANDLING Operator Overloading: Introduction, implementing operator overloading, reverse adding, overriding_getitem() and __setitem_() methods, overriding the in operator, overriding miscellaneous functions,overriding the call_() method. Error and Exception Handling: Introduction to errors and exceptions, handling exceptions, multipleexcept blocks, multiple exceptions in a single block, except block without exception, the else clause, raisingexceptions, built-in and user-defined exceptions, the finally block.