Python programming - Basics


30 hours (classroom sessions). 3 hours/session. Only on Sundays.

Target Audience

-        Anyone who’s interested in learning programming is welcome. Prior exposure to programming not required but logical and analytical thinking is a must.

-        Students of first year BE, Anna University, for their course GE8151 - PROBLEM SOLVING AND PYTHON PROGRAMMING


1.      Programming Basics: a Refresher

Computer and programs; the idea of programming; development of logic; Number systems – decimal, binary, hexadecimal; Boolean values; Simple algorithms for solving problems.

2.      Variables, operations and expressions

Python interpreter and interactive mode; values and types: int, float, Boolean, string, and list; variables, expressions, statements, tuple assignment, precedence of operators, comments; modules and functions, function definition and use, flow of execution, parameters and arguments.

3.      Control flow & functions

Conditionals: Boolean values and operators, conditional (if), alternative (if-else), chained conditional (if-elif-else); Iteration: state, while, for, break, continue, pass; Fruitful functions: return values, parameters, local and global scope, function composition, recursion; Strings: string slices, immutability, string functions and methods, string module; Lists as arrays.

4.      Data manipulation: lists, dictionaries & tuples

Lists: list operations, list slices, list methods, list loop, mutability, aliasing, cloning lists, list parameters; Tuples: tuple assignment, tuple as return value; Dictionaries: operations and methods; advanced list processing - list comprehension.

5.      File handling operations

Files and exception: text files, reading and writing files, format operator; command line arguments, errors and exceptions, handling exceptions, modules, packages.