Python from zero to advanced
A free Python course for Class 11-12 (CBSE Computer Science and Informatics Practices) and first-year college students (B.Tech, BSc, BCA), from your first print() to decorators, generators, pandas and the questions Python interviews ask. Every lesson has runnable examples and auto-checked practice that runs real Python in the browser, on a phone too.
Part 1 · Foundations
From your first print() to files: everything every board and university syllabus shares.
Module 1: Start coding
Write and run your first programs: print, numbers, names, text and input. A working bill calculator by lesson 4.
Module 2: Decisions and loops
Make programs choose (if/elif/else) and repeat (while, for, range), from grade calculators to star patterns and number programs.
- if / elif / else
- Combining conditions
- Loops: while and for
- Loop patterns
- Nested loops and patterns
- Number programs
Module 3: Functions
Package code into reusable functions with parameters and return values, understand scope, and use modules like math and random.
- Writing functions
- Scope and flow of execution
- Modules: math, random and friends
- Good functions: one job, docs and tests
Module 4: Strings
Index, slice and transform text: string methods and the classic string programs every exam asks.
- Indexing and slicing
- String methods
- String programs for practicals
- Text puzzles: ciphers and anagrams
Module 5: Lists and tuples
Store many values: lists, the aliasing trap, list patterns, nested lists, stacks, comprehensions and tuples.
- Lists
- Lists and names: the aliasing trap
- List patterns
- Nested lists: tables and matrices
- Stack, queue and list comprehensions
- Tuples
Module 6: Dictionaries and sets
Look things up by key: dictionaries, records, counting and sets, and how to pick the right collection.
Module 7: Errors and debugging
Read tracebacks, handle errors with try/except, raise your own, and debug like a pro.
Module 8: Files
Read and write text, CSV and JSON files so your programs remember things.
Part 2 · Core Python
Object-oriented programming and data with NumPy and pandas.
Module 9: Object-oriented programming
Model the real world with classes: objects, encapsulation, inheritance, polymorphism and good object design.
- Classes and objects
- Working with objects
- Encapsulation
- Inheritance
- Abstraction and polymorphism
- Object creation and design
Module 10: NumPy and pandas
Work with data: NumPy arrays, pandas Series and DataFrames, grouping and charts.
- NumPy arrays
- Working with arrays
- pandas Series
- DataFrames
- Changing and summarising
- CSV in, charts out
Part 3 · Advanced Python
Decorators, generators, internals, testing, real-world Python and concurrency: what interviews ask.
Module 11: Functions in depth
*args and **kwargs, functions as objects, closures and decorators: the tools behind clean Python.
- Flexible arguments: *args, **kwargs and the default trap
- Functions are objects: lambda and closures
- Decorators I: what @ really does
- Decorators II: arguments, classes and built-ins
Module 12: Iteration and the standard toolkit
Comprehensions, iterators and generators, and the built-ins and modules (collections, heapq, itertools) that save you code.
- Comprehensions in depth
- Iterators and generators
- Built-ins that save you
- The collections module
- heapq and bisect
- itertools and functools
Module 13: Python under the hood
Objects and identity, copies, memory management, how list and dict really work, and the GIL.
- Everything is an object
- Copies: assignment, shallow and deep
- Memory management
- How list, dict and set work
- Bytecode, the GIL and the Python way
Module 14: Exceptions, context managers and testing
Custom exceptions, writing your own with-blocks, logging and testing with pytest.
- Advanced exceptions
- Context managers: writing your own `with`
- Logging instead of print
- Testing: asserts, pytest, unittest and mocks
Module 15: Real-world Python
Packages and virtual environments, talking to web APIs, and databases with sqlite3.
Module 16: Concurrency
Threads, processes and asyncio: doing many things at once, and when each one helps.
Exam packs
Extra lessons for the CBSE Class 12 board and for first-year university exams.
Pack A: CBSE Class 12 Board Pack
Everything extra the CBSE Computer Science (083) board asks: binary files, CSV, stack, SQL and Python-MySQL, plus board-style drills.
- Binary files with pickle
- Binary file programs: search, append, update
- CSV files, board style
- Stack programs
- SQL you can run: queries for the board
- Python + MySQL connectivity
- Board question types: output, errors, assertion-reason
- Practical file, project and viva
Pack B: College Semester Pack
The extra topics first-year university syllabi add: recursion, searching and sorting, file automation, regex and a mini game.