SBS1304 - PYTHON PROGRAMMING

COURSE OBJECTIVES

  • To provide Basic knowledge of Python
  • To learn how to design and program Python applications.
  • To learn how to use lists, tuples, and dictionaries in Python programs

 

Unit I                                                                                                                                                                                       (9 Hrs)

Overview of Programming : Structure of a Python Program, Elements of Python.

Unit II                                                                                                                                                                                      (9 Hrs)

Introduction to Python: Python Interpreter, Using Python as calculator, Python shell, Indentation. Atoms, Identifiers and keywords, Literals, Strings, Operators(Arithmetic operator, Relational operator, Logical or Boolean operator, Assignment, Operator, Ternary operator, Bit wise operator, Increment or Decrement operator).

Unit III                                                                                                                                                                                     (9 Hrs)

Creating Python Programs :Input and Output Statements, Control statements(Branching, Looping, Conditional Statement, Exit function, Difference between break, continue and pass.), Defining Functions, default arguments, Errors and Exceptions.

Unit IV                                                                                                                                                                                    (9 Hrs)

Iteration and Recursion: Conditional execution, Alternative execution, Nested conditionals, The return statement, Recursion, Stack diagrams for recursive functions, Multiple assignment, The while statement, Tables, Two-dimensional tables.

Unit V                                                                                                                                                                                     (9 Hrs)

Strings and Lists: String as a compound data type, Length, Traversal and the for loop, String slices, String comparison, A find function, Looping and counting, List values, Accessing elements, List length, List membership, Lists and for loops, List operations, List deletion. Cloning lists, Nested lists.

Text Books:

  1. Allen Downey, Jeffrey Elkner, Chris Meyers.How to think like a computer scientist learning with Python / 1st Edition,2012

Useful websites: