PYTHON COURSE

Learn Python step by step

Each topic has simple notes, example code, and one challenge. You run Python in your browser. When your output passes the checks, you unlock the next topic.

7 phases 63 topics Challenges with checks

How to use this course

  • Open a topic card. Read the notes and the example code.
  • Do the challenge in the editor and click Run.
  • Finish one topic to unlock the next. Cards show Locked, Open, or Completed.
  • The course checks your output so you know you really solved the task.

All Topic Cards

Course progress: 0/63

Print and Comments

Topic 1 - Phase 1: Foundations

Print and Comments

You will study Print and Comments. It belongs to the Foundations phase. Remember this: Python executes line by line and print shows the current …

Variables

Topic 2 - Phase 1: Foundations

Variables

Variables is used in many real programs. Right now you are in Foundations. Core idea: A variable is a named box storing data. Read …

Data Types

Topic 3 - Phase 1: Foundations

Data Types

This lesson is about Data Types. You are in the Foundations part of the course. Main idea: Python tracks the type of each value …

Type Casting

Topic 4 - Phase 1: Foundations

Type Casting

You will study Type Casting. It belongs to the Foundations phase. Remember this: Casting converts values into the required data type. Practice step by …

Operators

Topic 5 - Phase 1: Foundations

Operators

Operators is used in many real programs. Right now you are in Foundations. Core idea: Operators tell Python what operation to perform between values. …

Comparison Operators

Topic 6 - Phase 1: Foundations

Comparison Operators

This lesson is about Comparison Operators. You are in the Foundations part of the course. Main idea: Comparisons evaluate to True or False. How …

Logical Operators

Topic 7 - Phase 1: Foundations

Logical Operators

You will study Logical Operators. It belongs to the Foundations phase. Remember this: Logical operators combine multiple True/False conditions. Practice step by step. Do …

User Input

Topic 8 - Phase 1: Foundations

User Input

User Input is used in many real programs. Right now you are in Foundations. Core idea: input() always returns text unless converted. Read the …

if/else

Topic 9 - Phase 2: Logic

if/else

This lesson is about if/else. You are in the Logic part of the course. Main idea: if chooses one path based on condition result. …

elif Ladder

Topic 10 - Phase 2: Logic

elif Ladder

You will study elif Ladder. It belongs to the Logic phase. Remember this: elif checks additional conditions when previous ones fail. Practice step by …

Nested Conditions

Topic 11 - Phase 2: Logic

Nested Conditions

Nested Conditions is used in many real programs. Right now you are in Logic. Core idea: A condition can contain another decision layer. Read …

match/case

Topic 12 - Phase 2: Logic

match/case

This lesson is about match/case. You are in the Logic part of the course. Main idea: match routes execution by exact pattern/value. How to …

while Loop

Topic 13 - Phase 2: Logic

while Loop

You will study while Loop. It belongs to the Logic phase. Remember this: while repeats until condition becomes False. Practice step by step. Do …

for Loop

Topic 14 - Phase 2: Logic

for Loop

for Loop is used in many real programs. Right now you are in Logic. Core idea: for iterates over each item in a sequence. …

break and continue

Topic 15 - Phase 2: Logic

break and continue

This lesson is about break and continue. You are in the Logic part of the course. Main idea: break exits loop; continue skips current …

Loop else

Topic 16 - Phase 2: Logic

Loop else

You will study Loop else. It belongs to the Logic phase. Remember this: else runs if loop completes without break. Practice step by step. …

try/except

Topic 17 - Phase 2: Logic

try/except

try/except is used in many real programs. Right now you are in Logic. Core idea: Exceptions jump control to except blocks. Read the example …

finally and raise

Topic 18 - Phase 2: Logic

finally and raise

This lesson is about finally and raise. You are in the Logic part of the course. Main idea: finally runs no matter what; raise …

Lists

Topic 19 - Phase 3: Data Mastery

Lists

You will study Lists. It belongs to the Data Mastery phase. Remember this: Lists are ordered mutable collections. Practice step by step. Do not …

List Methods

Topic 20 - Phase 3: Data Mastery

List Methods

List Methods is used in many real programs. Right now you are in Data Mastery. Core idea: Methods modify list state. Read the example …

List Comprehension

Topic 21 - Phase 3: Data Mastery

List Comprehension

This lesson is about List Comprehension. You are in the Data Mastery part of the course. Main idea: Comprehension builds a new list from …

Tuples

Topic 22 - Phase 3: Data Mastery

Tuples

You will study Tuples. It belongs to the Data Mastery phase. Remember this: Tuples are ordered immutable collections. Practice step by step. Do not …

Sets

Topic 23 - Phase 3: Data Mastery

Sets

Sets is used in many real programs. Right now you are in Data Mastery. Core idea: Sets store unique unordered values. Read the example …

Set Operations

Topic 24 - Phase 3: Data Mastery

Set Operations

This lesson is about Set Operations. You are in the Data Mastery part of the course. Main idea: Set math finds overlaps and differences …

Dictionaries

Topic 25 - Phase 3: Data Mastery

Dictionaries

You will study Dictionaries. It belongs to the Data Mastery phase. Remember this: Dictionary maps keys to values. Practice step by step. Do not …

Dictionary Methods

Topic 26 - Phase 3: Data Mastery

Dictionary Methods

Dictionary Methods is used in many real programs. Right now you are in Data Mastery. Core idea: Methods update and query key-value data efficiently. …

Nested Structures

Topic 27 - Phase 3: Data Mastery

Nested Structures

This lesson is about Nested Structures. You are in the Data Mastery part of the course. Main idea: Lists and dicts can nest to …

Slicing

Topic 28 - Phase 3: Data Mastery

Slicing

You will study Slicing. It belongs to the Data Mastery phase. Remember this: Slicing takes a window from sequence using start:stop:step. Practice step by …

Functions

Topic 29 - Phase 4: Functional Programming

Functions

Functions is used in many real programs. Right now you are in Functional Programming. Core idea: Functions package reusable logic. Read the example code …

Parameters and Return

Topic 30 - Phase 4: Functional Programming

Parameters and Return

This lesson is about Parameters and Return. You are in the Functional Programming part of the course. Main idea: Parameters are inputs; return gives …

Scope (LEGB)

Topic 31 - Phase 4: Functional Programming

Scope (LEGB)

You will study Scope (LEGB). It belongs to the Functional Programming phase. Remember this: Python resolves names in Local, Enclosing, Global, Builtin order. Practice …

Lambda

Topic 32 - Phase 4: Functional Programming

Lambda

Lambda is used in many real programs. Right now you are in Functional Programming. Core idea: Lambda is a small anonymous one-expression function. Read …

map/filter/reduce

Topic 33 - Phase 4: Functional Programming

map/filter/reduce

This lesson is about map/filter/reduce. You are in the Functional Programming part of the course. Main idea: Functional tools transform streams of values. How …

*args

Topic 34 - Phase 4: Functional Programming

*args

You will study *args. It belongs to the Functional Programming phase. Remember this: args collects extra positional inputs as tuple. Practice step by step. …

**kwargs

Topic 35 - Phase 4: Functional Programming

**kwargs

**kwargs is used in many real programs. Right now you are in Functional Programming. Core idea: kwargs collects named inputs as dictionary. Read the …

Closures

Topic 36 - Phase 4: Functional Programming

Closures

This lesson is about Closures. You are in the Functional Programming part of the course. Main idea: Inner function remembers outer scope variables. How …

Classes and Objects

Topic 37 - Phase 5: Object-Oriented Programming

Classes and Objects

You will study Classes and Objects. It belongs to the Object-Oriented Programming phase. Remember this: Class defines structure; object is concrete instance. Practice step …

__init__ Constructor

Topic 38 - Phase 5: Object-Oriented Programming

__init__ Constructor

__init__ Constructor is used in many real programs. Right now you are in Object-Oriented Programming. Core idea: init runs when creating new object. Read …

Class vs Instance Attributes

Topic 39 - Phase 5: Object-Oriented Programming

Class vs Instance Attributes

This lesson is about Class vs Instance Attributes. You are in the Object-Oriented Programming part of the course. Main idea: Class attrs shared by …

Instance Methods

Topic 40 - Phase 5: Object-Oriented Programming

Instance Methods

You will study Instance Methods. It belongs to the Object-Oriented Programming phase. Remember this: Methods operate on object state through self. Practice step by …

Inheritance

Topic 41 - Phase 5: Object-Oriented Programming

Inheritance

Inheritance is used in many real programs. Right now you are in Object-Oriented Programming. Core idea: Child class reuses and extends parent behavior. Read …

Method Overriding

Topic 42 - Phase 5: Object-Oriented Programming

Method Overriding

This lesson is about Method Overriding. You are in the Object-Oriented Programming part of the course. Main idea: Child can replace inherited method behavior. …

Polymorphism

Topic 43 - Phase 5: Object-Oriented Programming

Polymorphism

You will study Polymorphism. It belongs to the Object-Oriented Programming phase. Remember this: Different classes respond to same method name differently. Practice step by …

Encapsulation

Topic 44 - Phase 5: Object-Oriented Programming

Encapsulation

Encapsulation is used in many real programs. Right now you are in Object-Oriented Programming. Core idea: Hide internal state and expose controlled access. Read …

Abstraction

Topic 45 - Phase 5: Object-Oriented Programming

Abstraction

This lesson is about Abstraction. You are in the Object-Oriented Programming part of the course. Main idea: Expose what to do, hide how it …

Dataclasses

Topic 46 - Phase 5: Object-Oriented Programming

Dataclasses

You will study Dataclasses. It belongs to the Object-Oriented Programming phase. Remember this: Dataclass auto-generates boilerplate for data containers. Practice step by step. Do …

Iterators

Topic 47 - Phase 6: Advanced Engineering

Iterators

Iterators is used in many real programs. Right now you are in Advanced Engineering. Core idea: Iterator yields one item at a time via …

Generators

Topic 48 - Phase 6: Advanced Engineering

Generators

This lesson is about Generators. You are in the Advanced Engineering part of the course. Main idea: Generator yields lazily and remembers state between …

Decorators

Topic 49 - Phase 6: Advanced Engineering

Decorators

You will study Decorators. It belongs to the Advanced Engineering phase. Remember this: Decorator wraps a function to add behavior before/after. Practice step by …

Recursion

Topic 50 - Phase 6: Advanced Engineering

Recursion

Recursion is used in many real programs. Right now you are in Advanced Engineering. Core idea: Function solves smaller version of itself until base …

Context Managers

Topic 51 - Phase 6: Advanced Engineering

Context Managers

This lesson is about Context Managers. You are in the Advanced Engineering part of the course. Main idea: with ensures setup and cleanup around …

Regular Expressions

Topic 52 - Phase 6: Advanced Engineering

Regular Expressions

You will study Regular Expressions. It belongs to the Advanced Engineering phase. Remember this: Regex is pattern matching for text. Practice step by step. …

Modules and Packages

Topic 53 - Phase 6: Advanced Engineering

Modules and Packages

Modules and Packages is used in many real programs. Right now you are in Advanced Engineering. Core idea: Modules split code into reusable files. …

Logging

Topic 54 - Phase 6: Advanced Engineering

Logging

This lesson is about Logging. You are in the Advanced Engineering part of the course. Main idea: Logs capture runtime events by severity levels. …

Multithreading Basics

Topic 55 - Phase 6: Advanced Engineering

Multithreading Basics

You will study Multithreading Basics. It belongs to the Advanced Engineering phase. Remember this: Threads run tasks concurrently, best for I/O waits. Practice step …

Asyncio Basics

Topic 56 - Phase 6: Advanced Engineering

Asyncio Basics

Asyncio Basics is used in many real programs. Right now you are in Advanced Engineering. Core idea: Async tasks cooperate via event loop and …

Virtual Environments

Topic 57 - Phase 7: Real-World Tools

Virtual Environments

This lesson is about Virtual Environments. You are in the Real-World Tools part of the course. Main idea: Virtual env isolates project dependencies. How …

pip and requirements

Topic 58 - Phase 7: Real-World Tools

pip and requirements

You will study pip and requirements. It belongs to the Real-World Tools phase. Remember this: requirements.txt captures dependency versions for reproducibility. Practice step by …

File Handling

Topic 59 - Phase 7: Real-World Tools

File Handling

File Handling is used in many real programs. Right now you are in Real-World Tools. Core idea: Files are streams read/written in modes. Read …

JSON

Topic 60 - Phase 7: Real-World Tools

JSON

This lesson is about JSON. You are in the Real-World Tools part of the course. Main idea: JSON represents structured data as text. How …

REST APIs

Topic 61 - Phase 7: Real-World Tools

REST APIs

You will study REST APIs. It belongs to the Real-World Tools phase. Remember this: API request sends input and receives structured response. Practice step …

NumPy Basics

Topic 62 - Phase 7: Real-World Tools

NumPy Basics

NumPy Basics is used in many real programs. Right now you are in Real-World Tools. Core idea: NumPy arrays support fast vectorized math. Read …

Pandas Basics

Topic 63 - Phase 7: Real-World Tools

Pandas Basics

This lesson is about Pandas Basics. You are in the Real-World Tools part of the course. Main idea: DataFrame is table-like structure for analysis. …