PY-101 learning dashboard
Pick up where you left off, or open any lesson below. Everything stays on this device.
Learner
Python Hatchling ยท 0 XP ยท ๐ฅ 0-day streak
PY-101 course progress
0%
- Lessons done
- 0 / 60
- Challenges solved
- 0
- Robot Maze levels
- 0 / 5
- Best exam score
- Not yet
Python Core Certificate
Your road to the certificate
Finish PY-101 Python Core, pass the 50-question final exam with 70% or more, and get a certificate with your name, a certificate ID anyone can verify, a PDF to download and one click to add it to LinkedIn.
- ๐ PDF and PNG download
- ๐ Verifiable ID and link
- in Add to LinkedIn
- ๐ Shareable badge
- Lessons0 / 60 done
- Final examNot passed yet
- CertificateNot claimed yet
Learning tools
All lessons
In course order. A green tick means the lesson is complete.
14 modules ยท 60 lessons ยท 300 practice questions
Module 1: Getting started with Python
- What is Python? Python is a general-purpose programming language that reads almost like plain English.
- print() and your first program print() is the built-in Python function that shows values on the screen.
- Comments A comment is text in your code that Python ignores.
Module 2: Variables and data types
- Variables A variable is a name that points to a value, such as age = 25.
- Data types A data type tells Python what kind of value something is and what you can do with it.
- Type conversion Type conversion, also called casting, turns a value into another type with int(), float(), str() or bool().
Module 3: Operators
- Arithmetic operators Arithmetic operators do maths on numbers: + - * and / work as you expect, // divides and drops the remainder, % gives the remainder, and ** raises to a power.
- Comparison and logical operators Comparison operators such as ==, !=, < and >= compare two values and give True or False.
Module 4: Strings and input
- Strings and f-strings A string is text, stored as a sequence of characters you can index and slice.
- User input and Lab 01: Calculator input() pauses the program, shows a prompt and returns what the user typed, always as a string.
Module 5: Conditions
- if, elif and else An if statement runs a block of code only when its condition is True.
- Nested conditions A nested condition is an if inside another if, so the inner check only happens when the outer one is True.
- match statements A match statement compares one value against a list of case patterns and runs the first one that fits.
Module 6: Loops
- for loops and range() A for loop runs a block once for each item in a sequence, such as a list, a string or a range of numbers.
- while loops A while loop repeats its block as long as its condition is True, checking before every round.
- break, continue and loop else break ends a loop immediately, continue skips the rest of the current round and goes to the next one.
- Nested loops A nested loop is a loop inside another loop: for every round of the outer loop, the inner loop runs all the way through.
Module 7: Functions
- Defining functions A function is a named block of code you can run whenever you need it, by calling its name with brackets.
- Parameters and return values Parameters are the names in a function's brackets that receive the values you pass in, called arguments.
- Default and keyword arguments A default value makes a parameter optional: def greet(name, greeting="Hello"): uses "Hello" unless you pass something else.
- *args and **kwargs *args collects any number of extra positional arguments into a tuple, and **kwargs collects any number of keyword arguments into a dictionary.
- Scope Scope is where a variable can be seen.
- Lambda functions A lambda is a small, unnamed function written in one line: lambda x: x * 2 takes x and returns x * 2.
- Recursion Recursion is when a function calls itself to solve a smaller version of the same problem.
Module 8: Collections
- Lists A list is an ordered collection of values in square brackets, such as ["tea", "milk"].
- Tuples A tuple is an ordered group of values in round brackets, such as (12.97, 77.59), that cannot be changed after it is made.
- Sets A set is an unordered collection of unique values in curly brackets, such as {"tea", "milk"}.
- Dictionaries A dictionary stores values under unique keys, written as {"name": "Asha", "age": 29}.
- Comprehensions A comprehension builds a new list, dict or set from another collection in one line: [x * 2 for x in nums].
- Unpacking Unpacking assigns the items of a sequence to several variables at once: name, age = ("Asha", 29).
- Sorting and searching sorted(items) returns a new sorted list, while items.sort() sorts the list in place.
Module 9: Strings in depth
- String methods String methods are built-in tools you call on any string with a dot, such as text.split() or name.startswith("Dr").
- Formatting numbers and dates Inside an f-string, a colon after a value adds a format spec: f"{price:,.2f}" gives 1,499.50 and f"{rate:.1%}" gives 12.5%.
- Slicing patterns A slice takes part of a string or list with [start:stop:step].
- Regular expressions basics A regular expression is a pattern that describes text, like \d+ for "one or more digits".
Module 10: Files and errors
- Reading and writing files open(name, mode) opens a file: "w" writes (replacing what was there), "a" appends to the end and "r" reads.
- with and context managers A with statement runs a block of code inside a context manager, which sets something up at the start and always cleans it up at the end, even if an error happens.
- CSV and JSON CSV stores rows and columns as text with commas, like a spreadsheet, and Python's csv module reads and writes it.
- try, except and finally try runs code that might fail; if it raises an exception, the matching except block handles it instead of the program crashing.
- Raising and custom exceptions raise stops a function and signals a problem, such as raise ValueError("amount must be positive").
Module 11: Modules and packages
- import and from import brings a module into your program, and you use its contents with a dot: import math, then math.sqrt(16).
- The standard library tour The standard library is the large set of modules that comes with Python, so you can use them without installing anything.
- pip and virtual environments pip installs packages from PyPI, such as pip install requests.
- if __name__ == "__main__" Every Python file has a built-in variable __name__.
Module 12: Object-oriented Python
- Classes and objects A class is a blueprint that describes a kind of thing, and an object is one actual thing made from that blueprint.
- __init__ and attributes __init__ is a special method that runs automatically when an object is created, and it sets up the object's attributes.
- Methods A method is a function defined inside a class.
- Inheritance Inheritance lets a new class (the child) start from an existing class (the parent) and get all its attributes and methods, written class Child(Parent):.
- Polymorphism Polymorphism means different classes can be used the same way because they share a method name, even though each does its own thing.
- Encapsulation Encapsulation means an object protects its own data and only lets the outside change it in controlled ways.
- Dunder methods Dunder methods are special methods with double underscores, like __str__ or __eq__, that Python calls for you in certain situations.
- Dataclasses A dataclass is a class mainly for holding data, created with the @dataclass decorator.
Module 13: Advanced Python
- Iterators An iterable is anything you can loop over, such as a list or a string.
- Generators A generator is a function that uses yield instead of return.
- Decorators A decorator is a function that takes another function and returns a new function that adds something before or after it, such as logging or a permission check.
- Type hints Type hints are optional notes that say what type a value should be, such as def total(prices: list[float]) -> float:.
Module 14: Testing and debugging
- Reading tracebacks A traceback is the report Python prints when an error stops your program.
- Debugging step by step Debugging is finding where the program's real behaviour first differs from what you expected.
- assert assert condition, "message" checks that a condition is True and raises AssertionError with your message if it is False.
- pytest basics pytest is Python's most popular testing tool: you write functions whose names start with test_, put plain asserts inside, and run pytest to execute them all and report which pass.