SYLLABUS
Unit-I
Introduction: What is a Program, Running Python, Arithmetic Operators, Value and Types.
Variables, Assignments and Statements: Assignment Statements, Script Mode, Order of Operations,
String Operations, Comments.
Functions: Function Calls, Math Functions, Composition, Adding New Functions, Definitions and Uses,
Flow of Execution, Parameters and Arguments, Variables and Parameters are Local, Stack Diagrams,
Fruitful Functions and Void Functions, Why Functions.
Unit-II
Case Study: The Turtle Module, Simple Repetition, Encapsulation, Generalization, Interface Design,
Refactoring, Docstring.
Conditionals and Recursion: Floor Division and Modulus, Boolean Expressions, Logical Operators,
Conditional Execution, Alternative Execution, Chained Conditionals, Nested Conditionals, Recursion, Infinite
Recursion, Keyboard Input.
Fruitful Functions: Return Values, Incremental Development, Composition, Boolean Functions, More
Recursion, Leap of Faith, Checking Types.
Unit-III
Iteration: Reassignment, Updating Variables, The while Statement, Break, Square Roots, Algorithms.
Strings: A String is a Sequence, len, Traversal with a for Loop, String Slices, Strings are Immutable,
Searching, Looping and Counting, String Methods, The in Operator, String Comparison.
Case Study: Reading Word Lists, Search, Looping with Indices.
Lists: List is a Sequence, Lists are Mutable, Traversing a List, List Operations, List Slices, List Methods,
Map Filter and Reduce, Deleting Elements, Lists and Strings, Objects and Values, Aliasing, List Arguments.
Unit-IV
Dictionaries: A Dictionary is a Mapping, Dictionary as a Collection of Counters, Looping and Dictionaries,
Reverse Lookup, Dictionaries and Lists, Memos, Global Variables.
Tuples: Tuples are Immutable, Tuple Assignment, Tuple as Return Values, Variable-length Argument
Tuples, Lists and Tuples, Dictionaries and Tuples, Sequences of Sequences.
Files: Persistence, Reading and Writing, Format Operator, Filename and Paths, Catching Exceptions,
Databases, Pickling, Pipes, Writing Modules.
Classes and Objects: Programmer-defined Types, Attributes, Instances as Return Values, Objects are
Mutable, Copying.
Unit-V
Classes and Functions: Time, Pure Functions, Modifiers, Prototyping Versus Planning.
Classes and Methods: Object Oriented Features, Printing Objects, The init Method, The _str_ Method,
Operator Overloading, Type-based Dispatch, Polymorphism, Interface and Implementation.
Inheritance: Card Objects, Class Attributes, Comparing Cards, Decks, Printing the Deck, Add Remove
Shuffle and Sort, Inheritance, Class Diagrams, Data Encapsulation.
The Goodies: Conditional Expressions, List Comprehensions, Generator Expressions, Any and All, Sets,
Counters, Defaultdict, Named Tuples, Gathering Keyword Args.