ALGORITHMIC PROBLEM SOLVING
Algorithms, building blocks of algorithms (statements, state, control flow, functions), notation (pseudo code, flow chart, programming language), algorithmic problem solving, simple strategies for developing algorithms (iteration, recursion). Illustrative problems: find minimum in a list, insert a card in a list of sorted cards, and guess an integer number in a range, Towers of Hanoi.
DATA, 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.
STATEMENTS, CONTROL FLOW
Illustrative programs: exchange the values of two variables, circulate the values of n variables, distance between two points. Conditionals: Boolean values and operators, conditional (if), alternative (if-else), chained conditional (if-elif-else); Iteration: state, while, for, break, continue, pass; Strings: string slices, immutability, string functions and methods, string module.
FUNCTIONS, LISTS
Fruitful functions: return values, parameters, local and global scope, function composition, recursion; Lists as arrays. Illustrative programs: square root, gcd, exponentiation, sum an array of numbers, linear search, binary search. Lists: list operations, list slices, list methods, list loop, mutability, aliasing, cloning lists, list parameters.
TUPLES, DICTIONARIES
Tuples: tuple assignment, tuple as return value; Dictionaries: operations and methods; advanced list processing - list comprehension; Illustrative programs: selection sort, insertion sort, mergesort, histogram.
Course Outcomes:
At the end of the course the student will be able to:
Question paper pattern:
Textbook/s
1 Think Python: How to Think Like a Computer Scientist Allen B. Downey Shroff O’Reilly Publishers 2nd edition 2016
2 An Introduction to Python – Revised and updated for Python 3.2 Guido van Rossum and Fred L. Drake Jr Network Theory Ltd., 2011
Reference Books
3 Introduction to Computer Science using Python: A Computational Problem-Solving Focus Charles Dierbach Wiley India Edition 2013
4 Introduction to Programming in Python: An Inter-disciplinary Approach Robert Sedgewick, Kevin Wayne, Robert Dondero Pearson India Education Services Pvt. Ltd 2016
5 Fundamentals of Python: First Programs Kenneth A. Lambert CENGAGE Learning 2012