Python Programming Syllabus, Course Objectives, Outcomes and Books

These Python Programming notes follow the syllabus of the B.Tech CSE III Year II Semester Open Elective course (R17A0554). The syllabus, course objectives, outcomes and recommended books are listed below, followed by the topics of each of the five units.

Course Objectives

  • To read and write simple Python programs.
  • To develop Python programs with conditionals and loops.
  • To define Python functions and call them.
  • To use Python data structures – lists, tuples, dictionaries.
  • To do input/output with files in Python.

Syllabus

Unit I: Introduction, Data, Expressions, Statements

Introduction to Python and installation, data types: Int, float, Boolean, string, and list; variables, expressions, statements, precedence of operators, comments; modules, functions, function and its use, flow of execution, parameters and arguments.

Unit II: Control Flow, Loops

Conditionals: Boolean values and operators, conditional (if), alternative (if-else), chained conditional (if-elif-else); Iteration: while, for, break, continue.

Unit III: Functions, Arrays

Fruitful functions: return values, parameters, local and global scope, function composition, recursion; Strings: string slices, immutability, string functions and methods, string module; Python arrays, access the elements of an array, array methods.

Unit IV: Lists, Tuples, Dictionaries

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

Unit V: Files, Exceptions, Modules, Packages

Files and exception: text files, reading and writing files, command line arguments, errors and exceptions, handling exceptions, modules (datetime, time, OS, calendar, math module), explore packages.

Course Outcomes

Upon completion of the course, students will be able to:

  • Read, write, execute by hand simple Python programs.
  • Structure simple Python programs for solving problems.
  • Decompose a Python program into functions.
  • Represent compound data using Python lists, tuples, dictionaries.
  • Read and write data from/to files in Python programs.

Text Books

  1. Allen B. Downey, “Think Python: How to Think Like a Computer Scientist”, 2nd edition, Updated for Python 3, Shroff/O’Reilly Publishers, 2016.
  2. R. Nageswara Rao, “Core Python Programming”, Dreamtech.
  3. Python Programming: A Modern Approach, Vamsi Kurama, Pearson.

Reference Books

  1. Core Python Programming, W. Chun, Pearson.
  2. Introduction to Python, Kenneth A. Lambert, Cengage.
  3. Learning Python, Mark Lutz, O’Reilly.