Python Programming — Free Notes & Tutorial
Free Python Programming university course covering the full syllabus — origin & features, operators, control structures, strings, lists, tuples, dictionaries, functions, modules, NumPy arrays, Matplotlib and file handling, in 50+ detailed lessons. 100% free.
This Python Programming course is part of Siksha Sarovar and is 100% free for students in India — no sign-up required to read. It contains 50 structured lessons with examples, and pairs with our free online compiler and AI tutor.
What you will learn
- Python origin and features
- Identifiers
- IDLE
- Variables
- Data types
- Arithmetic/relational/logical/bitwise/membership operators
- If-elif-else
- Loops
- Strings
- Lists
- Tuples
- Dictionaries
- Functions
- Arguments
- Scope
- Recursion
- Modules
- Packages
- NumPy arrays
- Matplotlib bar and pie charts
- File handling
Course content (50 lessons)
- About This Course — Python Programming — University Course This course covers Python Programming as taught in undergraduate BCA/BTech university courses. The syllabus is divided into 4 units —…
- Unit 1 — Origin & Need of Python Programming — Origin & Need of Python Programming Origin of Python Python was created by Guido van Rossum and first released in 1991 at Centrum Wiskunde & Informatica (CWI) in the Netherlands.…
- Unit 1 — Features of Python — Features of Python Python's popularity comes from a set of well-designed language features: Feature Explanation --------- ------------- Simple & Easy to Learn Clean, English-like…
- Unit 1 — Program Structure of Python — Program Structure of a Python Program Unlike C/Java, Python has no mandatory main function , no semicolons, and uses indentation instead of braces to define blocks. Key structural…
- Unit 1 — Identifiers & Reserved Words — Identifiers and Reserved Words Identifiers An identifier is the name given to variables, functions, classes, and modules. Rules for naming identifiers: 1. Can contain letters…
- Unit 1 — Escape Sequences — Escape Sequences An escape sequence starts with a backslash ( \ ) and represents a special character that cannot be typed directly into a string. Escape Sequence Meaning --- ---…
- Unit 1 — IDLE: Python Interpreter — IDLE — Python Interpreter IDLE (Integrated Development and Learning Environment) is the default IDE bundled with every Python installation. Two modes of working in IDLE 1.…
- Unit 1 — Variables & Assignment Statements — Variables and Assignment Statements A variable is a named reference to a value stored in memory. Python variables do not need explicit type declaration — the type is determined at…
- Unit 1 — Data Types — Data Types in Python Python has several built-in data types, broadly grouped as: Category Types --- --- Numeric int , float , complex Sequence str , list , tuple , range Mapping…
- Unit 1 — Assignment & Unary Operators — Assignment and Unary Operators Assignment Operators Assignment operators assign or update the value stored in a variable. Operator Example Equivalent To --- --- --- = x = 5 direct…
- Unit 1 — Arithmetic Operators — Arithmetic Operators Operator Meaning Example Result --- --- --- --- + Addition 7 + 3 10 - Subtraction 7 - 3 4 Multiplication 7 3 21 / True division (always returns float) 7 / 2…
- Unit 1 — Relational (Comparison) Operators — Relational Operators Relational operators compare two values and always return a boolean ( True / False ). Operator Meaning Example Result --- --- --- --- == Equal to 5 == 5 True…
- Unit 1 — Logical Operators — Logical Operators Logical operators combine boolean expressions. Operator Meaning Example Result --- --- --- --- and True if both operands are True True and False False or True if…
- Unit 1 — Bitwise Operators — Bitwise Operators Bitwise operators work on the binary representation of integers, bit by bit. Operator Name Example Result --- --- --- --- & AND 5 & 3 1 \ OR 5 \ 3 7 ^ XOR 5 ^ 3…
- Unit 1 — Membership & Identity Operators — Membership and Identity Operators Membership Operators — in , not in Test whether a value exists within a sequence (string, list, tuple, dict, set). Operator Meaning --- --- in…
- Unit 1 — if Statement — if Conditional Statement The if statement executes a block of code only when its condition is True . Syntax - The condition is followed by a colon : . - The block must be indented…
- Unit 1 — if-else Statement — if-else Condition The if-else statement provides an alternate block to run when the condition is False . Syntax Output: Flowchart Ternary (Conditional) Expression Python supports…
- Unit 1 — if-elif-else Condition — if-elif-else Condition Used when there are multiple mutually exclusive conditions to check in sequence. Syntax Conditions are evaluated top to bottom ; the first True branch runs…
- Unit 1 — Nested if-elif-else — Nested if-elif-else A conditional statement placed inside another conditional statement's block is called a nested if . Output: Example: Largest of three numbers (nested if-else)…
- Unit 1 — for Loop — for Loop (Iteration) The for loop iterates over items of any iterable (string, list, tuple, dict, range, set) — unlike C's counter-based for loop. Syntax Output: Using range()…
- Unit 1 — while Loop — while Loop The while loop repeats a block as long as the condition remains True . Used when the number of iterations is not known in advance. Syntax Output: Important: the loop…
- Unit 1 — Nested Loops — Nested Loops A nested loop is a loop inside another loop. The inner loop completes all its iterations for every single iteration of the outer loop. Output: Example: Multiplication…
- Unit 1 — break & continue Statements — break and continue Statements break The break statement immediately terminates the nearest enclosing loop, skipping any remaining iterations. Output: continue The continue…
- Unit 1 — Strings: Slicing & Membership — Strings — Slicing and Membership A string in Python is an immutable, ordered sequence of Unicode characters, indexed from 0 . Slicing — s[start:stop:step] Extracts a substring ;…
- Unit 1 — String Built-in Functions — String Built-in Functions Python strings have many useful built-in methods (all return a new string/value — strings are immutable). count() and find() capitalize(), title(),…
- Unit 2 — Mutable & Immutable Objects — Mutable and Immutable Objects An object's mutability determines whether its contents can be changed after creation. Mutable (can change in place) Immutable (cannot change — a new…
- Unit 2 — Lists: Creating, Accessing, Slicing, Traversing — Lists — Creating, Initializing, Accessing, Slicing, Traversing A list is an ordered, mutable, heterogeneous collection of items enclosed in square brackets [] . Creating and…
- Unit 2 — List Operations — List Operations Operation Example Result --- --- --- len() len([1,2,3]) 3 Concatenation + [1,2] + [3,4] [1,2,3,4] Repetition [1,2] 3 [1,2,1,2,1,2] in 3 in [1,2,3] True not in 5…
- Unit 2 — List Methods — List Methods Method Purpose --- --- append(x) Add x to the end of the list extend(iterable) Add all items from another iterable to the end count(x) Count occurrences of x…
- Unit 2 — Tuples: Creating & Operations — Tuples — Creating Tuples and Operations A tuple is an ordered, immutable collection, written with parentheses () . Creating Tuples Tuples are Immutable Tuple Operations Operation…
- Unit 2 — Tuple Methods — Tuple Methods Because tuples are immutable, they support only two built-in methods: Method Purpose --- --- count(x) Number of occurrences of x in the tuple index(x) Index of the…
- Unit 2 — Dictionary: Creating, Accessing, Modifying, Deleting — Dictionary — Creating, Accessing, Adding, Modifying, Deleting A dictionary stores data as key-value pairs , enclosed in curly braces {} . Keys must be unique and immutable (str,…
- Unit 2 — Dictionary Methods & List vs Dictionary — Dictionary Methods Method / Function Purpose --- --- len(d) Number of key-value pairs str(d) String representation of the dictionary clear() Removes all items copy() Returns a…
- Unit 3 — Functions: Defining, Calling, Types — Concept of Functions A function is a reusable, named block of code that performs a specific task. Defining and Calling a Function Syntax Types of Functions 1. Built-in functions —…
- Unit 3 — Arguments, Return Values, Formal vs Actual — Arguments and Return Values Passing Arguments Formal vs Actual Arguments Term Meaning --- --- Formal Parameter Variable name listed in the function definition ( a , b above)…
- Unit 3 — Scope & Lifetime of Variables — Scope and Lifetime Scope Scope determines where in the program a variable is visible/accessible. Scope Description --- --- Local Defined inside a function; accessible only within…
- Unit 3 — Keyword Arguments & Default Arguments — Keyword Arguments and Default Arguments Keyword Arguments Arguments passed by explicitly naming the parameter — order does not matter. You can mix positional and keyword…
- Unit 3 — Recursion — Recursion A recursive function calls itself to solve smaller instances of the same problem, until a base case stops the recursion. Anatomy of a recursive function 1. Base case —…
- Unit 3 — Modules: Importing Modules — Modules — Importing Modules A module is simply a .py file containing Python code (functions, classes, variables) that can be reused in other programs. Ways to Import a Module 1.…
- Unit 3 — Math and Random Module — Math and Random Module The math Module Function/Constant Purpose --- --- math.sqrt(x) Square root math.pow(x, y) x raised to power y (returns float) math.floor(x) Round down to…
- Unit 3 — Creating Your Own Modules and Packages — Creating Your Own Modules and Packages Creating a Custom Module Any .py file is automatically a module. Save the following as calculator.py : Now use it from another file in the…
- Unit 4 — NumPy Introduction & One-Dimensional Arrays — NumPy Library — Introduction NumPy (Numerical Python) is a library for fast, memory-efficient numerical computation using arrays — the foundation of the entire Python data-science…
- Unit 4 — Reshaping & Element-wise Operations — Re-shaping of an Array & Element-wise Operations Reshaping an Array reshape() changes an array's dimensions without changing its data — the total number of elements must stay the…
- Unit 4 — Aggregate Operations, Array Indexing & Slicing — Aggregate Operations, Array Indexing, Array Slicing Aggregate (Reduction) Operations Aggregate functions reduce an array to a single summary value. Aggregates on 2D arrays…
- Unit 4 — Insert/Append Rows & Columns, Array Manipulation — Insert Row/Columns, Append Row/Columns, Array Manipulation np.insert() — insert elements/rows/columns np.append() — append elements/rows/columns to the end np.delete() — remove…
- Unit 4 — Introduction to Matplotlib: Bar Graphs & Pie Charts — Introduction to Matplotlib Matplotlib is Python's most widely used library for creating static, animated, and interactive visualizations — plots, charts, and graphs. Installing…
- Unit 4 — File Handling: Types of Files — File Handling — Types of Files Python can read and write three broad categories of files: 1. Text Files Store data as human-readable characters ( .txt , .py , .md ). Opened in…
- Unit 4 — File Handling: Creation, Writing, Appending — File Handling — Creation, Writing, Appending Creating and Writing a File — mode 'w' 'w' mode creates a new file if it does not exist, and overwrites it completely if it does.…
- Unit 4 — File Handling: Insertion, Deletion, Updating Data — File Handling — Insertion, Deletion, Updating Data Python has no direct method to insert/delete/modify a line in the middle of a text file — because files are stored as a…
- Previous Year Questions — Python Programming — Previous Year Questions PYQ papers for this course will be added here soon. Check back later for: - End Term Examination papers - Mid Term papers - Important…
About This Course
Python Programming — University Course
This course covers Python Programming as taught in undergraduate BCA/BTech university courses. The syllabus is divided into 4 units — language basics and control flow, data structures (lists, tuples, dictionaries), functions and modules, and NumPy/Matplotlib/file handling.
Syllabus at a Glance:
| Unit | Topics |
|---|---|
| Unit 1 | Origin & features of Python, identifiers, IDLE, variables, data types, operators, control structures, strings |
| Unit 2 | Mutable/immutable objects, lists, tuples, dictionaries and their built-in methods |
| Unit 3 | Functions, arguments, scope, recursion, modules and packages |
| Unit 4 | NumPy arrays, matplotlib (bar/pie charts), file handling (text, binary, CSV) |
What you will learn:
- Write, run, and debug Python programs using IDLE
- Use every operator category and all forms of control flow
- Master strings, lists, tuples, and dictionaries with their built-in methods
- Write reusable functions, use recursion, and build your own modules
- Work with NumPy arrays, plot bar/pie charts with matplotlib, and read/write files
PYQ papers are available at the end of the lesson list.
Frequently asked questions
Is the Python Programming course really free?
Yes. The entire Python Programming course on Siksha Sarovar is free to read with no account required. You can optionally sign in with Google to save your progress.
Do I get a certificate for Python Programming?
Yes — finish the lessons and pass the quiz to earn a free, verifiable certificate you can share on LinkedIn or with recruiters.
Can I run code while learning?
Yes. The built-in online compiler runs C, C++, Python, Java, PHP, JavaScript, C# and SQL directly in your browser — no installation needed.