Chapter-Wise Notes
Understanding what programming is, the evolution of programming languages, and the concept of program execution.
Concept of Programming
Evolution of Programming Languages
Generation of Programming Languages (1GL to 5GL)
Types of Programming Paradigms (Procedural, OOP, Functional)
Introduction to Python Interpreter
Program Execution – Compile vs Interpret
Role of IDE in Programming
Designing step-by-step algorithms and drawing flowcharts to solve problems independent of any programming language.
Algorithm – Definition & Properties
Writing Algorithms in Steps
Flowchart Symbols (Start/End, Process, Decision, I/O, Connector)
Drawing Flowcharts for Simple Programs
Pseudocode Writing
Constructs: Sequence, Selection, Iteration
Case Study: Finding Largest Number
Case Study: Factorial Computation
Case Study: Fibonacci Sequence
Case Study: Prime Number Check
Case Study: Reverse Order of Array Elements
Case Study: Linear Search in an Array
Case Study: sin(x) as Sum of a Series
Python Fundamentals
Python Introduction & Technical Strengths
Introduction to Python Interpreter & Program Execution
Using Comments (Single-line & Multi-line)
Literals and Constants
Python Built-in Data Types
Numbers (Integers, Floats, Complex, Real, Sets)
Accepting Input from Console – input()
Printing Statements – print()
Simple Python Programs
Strings
String Slicing (start:stop:step)
String Indexing & Negative Indexing
String Concatenation & Repetition
Other Operations on Strings
String Methods (upper, lower, strip, split, join, replace, find, count, startswith, endswith, isdigit, isalpha, capitalize, title, swapcase)
String Formatting – %, format(), f-strings
ord() and chr()
String Comparison
Operators & Expressions
Assignment Statement
Expressions
Arithmetic Operators (+, -, *, /, //, %, **)
Relational (Comparison) Operators (==, !=, >, <, >=, <=)
Logical Operators (and, or, not)
Bitwise Operators (&, |, ^, ~, <<, >>)
Operator Precedence and Associativity
Control Flow & Loops
Conditional Statements: if, if-else, if-elif-else
Notion of Iterative Computation
range() Function
while Loop
for Loop
break Statement
continue Statement
pass Statement
else Clause with Loops
assert Statement
Practical Programs (Prime, Factorial, Fibonacci, Palindrome)
Lists
Creating & Accessing Lists
List Slicing, Indexing, Concatenation
List Methods (append, insert, remove, pop, sort, reverse, index, count)
Concept of Mutable Objects
List Comprehension
Finding Maximum, Minimum, Mean of a List
Linear Search on List/Tuple of Numbers
Tuples
Tuple Creation & Immutability
Tuple Slicing, Indexing, Concatenation
Tuple Methods (count, index)
Tuple Packing & Unpacking
Concept of Immutable Objects
Dictionaries
Creating Dictionaries (Key-Value Pairs)
Accessing & Modifying Dictionary Values
Dictionary Methods (keys, values, items, get, pop, update)
Counting Frequency of Elements Using a Dictionary
Iterating over Dictionaries
Defining & Using Functions
Top-Down Approach to Problem Solving
Modular Programming & Functions
Function Parameters & Local Variables
The return Statement
Doc Strings
global Statement
Default Argument Values
Keyword Arguments
VarArgs Parameters (*args, **kwargs)
Recursion Concept
Recursive Factorial & Fibonacci
Library & Built-in Functions
Library Functions: input(), eval(), print()
Numeric Functions: eval(), max(), min(), pow(), round(), int(), random(), ceil(), floor(), sqrt()
String Functions: count(), find(), rfind(), capitalize(), title(), lower(), upper(), swapcase(), replace(), strip(), split(), join(), isspace(), isalpha(), isdigit(), isalnum(), startswith(), endswith()
Date & Time Functions
Higher-Order Functions (map, filter)
Concept of Files
File Opening in Various Modes (r, w, a, r+, w+, b)
Closing a File
Reading from a File – read(), readline(), readlines()
Writing onto a File – write(), writelines()
File Functions: open(), close(), tell(), seek()
Command Line Arguments
Working with File Pointer
Scope of Objects & Names
Scope of Objects and Names in Python
LEGB Rule (Local, Enclosing, Global, Built-in)
Modules
Module Basics
Module Files as Namespaces
import Statement
from...import Syntax
Import Model
Reloading Modules
Standard Library: math, random, datetime, os, sys, time
Creating Custom Modules
__name__ == "__main__"
Introduction to NumPy — Python's essential library for numerical computation and array manipulation.
Introduction to NumPy
NumPy ndarray – N-dimensional Array
Data Types in NumPy (dtype)
Array Attributes (shape, ndim, size, dtype)
Array Creation Routines (array(), zeros(), ones(), arange(), linspace())
Array From Existing Data
Array From Numerical Ranges
Indexing & Slicing of NumPy Arrays
Array Manipulation (reshape, split, join)
Accessing Data and Subarrays