




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























































































Course Outline/Curriculum & Lecture/Tutorial Count
Module No. Topics
1
Computational Thinking and Problem-Solving: Identification of Computational Problems -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). Data Types, Expressions, and Statements: Python interpreter and interactive mode, debugging; values and types: int, float, Boolean, string, and list; variables, expressions, statements, tuple assignment, precedence of operators, comments.
2
Control Flow Functions, and Strings: Conditions - 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
3
Lists, Tuples, Dictionaries: Lists - list operations, list slices, list methods, list loop, mutability, aliasing, cloning lists, list parameters; Tuples - tuple assignment, tuple as a return value; Dictionaries - operations and methods; advanced list processing, list comprehension. Files, Modules, Packages: Files and exceptions: text files, reading and writing files, format operator; command line arguments, errors and exceptions, handling exceptions, modules packages.
Suggested Books
1. Yashavant Kanetkar, “Let Us Python”, 6 th^ **Edition, BPB publisher, 2023
Some terms you will frequently encounter
Python Prompt
IDE
Programming Methodology
Properties of Algorithm
- Input: 0 or more - Output: 1 or more - Finiteness: Should terminate within finite time, OR after finite iterations - Deterministic / Definiteness: Non-ambiguous - Task oriented steps: All steps should have meaningful task e.g. x=x //Useless - Generic: Steps should be language independent
Example
Basic Building Blocks of Algorithms
Basic Building Blocks of Algorithms
Statement: A single action in a computer
In a computer statements might include some of the following actions
Basic Building Blocks of Algorithms
Sequence: All the instructions are executed one after another is called sequence execution.
Example: Addition of two numbers
Step 1: Start
Step 2: get a,b
Step 3: calculate c=a+b
Step 4: Display c
Step 5: Stop
Basic Building Blocks of Algorithms
Selection: Statement causes the program control to be transferred to a specific part of the program based upon the condition.
If the conditional test is true, one part of the program will be executed, otherwise it will execute the other part of the program.
Example: Write an algorithm to check whether he is eligible to vote?
Step 1: Start
Step 2: Get age
Step 3: if age >= 18 print “Eligible to vote”
Step 4: else print “Not eligible to vote”
Step 6: Stop