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

Start here

What is Python?

Start lesson 1

Saved in this browser. Sign in to sync it across devices.

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
  1. Lessons0 / 60 done
  2. Final examNot passed yet
  3. CertificateNot claimed yet
PYTHON ACADEMY PY-101 CERTIFIED Python Core MSDEVBUILD

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

3 lessons ยท 0 done
  1. What is Python? Python is a general-purpose programming language that reads almost like plain English. Watch it come alive Live code Challenge 5-question quiz
  2. print() and your first program print() is the built-in Python function that shows values on the screen. Watch it come alive Live code Challenge 5-question quiz
  3. Comments A comment is text in your code that Python ignores. Watch it come alive Live code Challenge 5-question quiz

Module 2: Variables and data types

3 lessons ยท 0 done
  1. Variables A variable is a name that points to a value, such as age = 25. Watch it come alive Live code Challenge 5-question quiz
  2. Data types A data type tells Python what kind of value something is and what you can do with it. Watch it come alive Live code Challenge 5-question quiz
  3. Type conversion Type conversion, also called casting, turns a value into another type with int(), float(), str() or bool(). Watch it come alive Live code Challenge 5-question quiz

Module 3: Operators

2 lessons ยท 0 done
  1. 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. Watch it come alive Live code Challenge 5-question quiz
  2. Comparison and logical operators Comparison operators such as ==, !=, < and >= compare two values and give True or False. Watch it come alive Live code Challenge 5-question quiz

Module 4: Strings and input

2 lessons ยท 0 done
  1. Strings and f-strings A string is text, stored as a sequence of characters you can index and slice. Watch it come alive Live code Challenge 5-question quiz
  2. User input and Lab 01: Calculator input() pauses the program, shows a prompt and returns what the user typed, always as a string. Watch it come alive Live code Challenge 5-question quiz

Module 5: Conditions

3 lessons ยท 0 done
  1. if, elif and else An if statement runs a block of code only when its condition is True. Watch it come alive Live code Challenge 5-question quiz
  2. Nested conditions A nested condition is an if inside another if, so the inner check only happens when the outer one is True. Watch it come alive Live code Challenge 5-question quiz
  3. match statements A match statement compares one value against a list of case patterns and runs the first one that fits. Watch it come alive Live code Challenge 5-question quiz

Module 6: Loops

4 lessons ยท 0 done
  1. 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. Watch it come alive Live code Challenge 5-question quiz
  2. while loops A while loop repeats its block as long as its condition is True, checking before every round. Watch it come alive Live code Challenge 5-question quiz
  3. break, continue and loop else break ends a loop immediately, continue skips the rest of the current round and goes to the next one. Watch it come alive Live code Challenge 5-question quiz
  4. 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. Watch it come alive Live code Challenge 5-question quiz

Module 7: Functions

7 lessons ยท 0 done
  1. Defining functions A function is a named block of code you can run whenever you need it, by calling its name with brackets. Watch it come alive Live code Challenge 5-question quiz
  2. Parameters and return values Parameters are the names in a function's brackets that receive the values you pass in, called arguments. Watch it come alive Live code Challenge 5-question quiz
  3. Default and keyword arguments A default value makes a parameter optional: def greet(name, greeting="Hello"): uses "Hello" unless you pass something else. Watch it come alive Live code Challenge 5-question quiz
  4. *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. Watch it come alive Live code Challenge 5-question quiz
  5. Scope Scope is where a variable can be seen. Watch it come alive Live code Challenge 5-question quiz
  6. Lambda functions A lambda is a small, unnamed function written in one line: lambda x: x * 2 takes x and returns x * 2. Watch it come alive Live code Challenge 5-question quiz
  7. Recursion Recursion is when a function calls itself to solve a smaller version of the same problem. Watch it come alive Live code Challenge 5-question quiz

Module 8: Collections

7 lessons ยท 0 done
  1. Lists A list is an ordered collection of values in square brackets, such as ["tea", "milk"]. Watch it come alive Live code Challenge 5-question quiz
  2. 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. Watch it come alive Live code Challenge 5-question quiz
  3. Sets A set is an unordered collection of unique values in curly brackets, such as {"tea", "milk"}. Watch it come alive Live code Challenge 5-question quiz
  4. Dictionaries A dictionary stores values under unique keys, written as {"name": "Asha", "age": 29}. Watch it come alive Live code Challenge 5-question quiz
  5. Comprehensions A comprehension builds a new list, dict or set from another collection in one line: [x * 2 for x in nums]. Watch it come alive Live code Challenge 5-question quiz
  6. Unpacking Unpacking assigns the items of a sequence to several variables at once: name, age = ("Asha", 29). Watch it come alive Live code Challenge 5-question quiz
  7. Sorting and searching sorted(items) returns a new sorted list, while items.sort() sorts the list in place. Watch it come alive Live code Challenge 5-question quiz

Module 9: Strings in depth

4 lessons ยท 0 done
  1. String methods String methods are built-in tools you call on any string with a dot, such as text.split() or name.startswith("Dr"). Watch it come alive Live code Challenge 5-question quiz
  2. 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%. Watch it come alive Live code Challenge 5-question quiz
  3. Slicing patterns A slice takes part of a string or list with [start:stop:step]. Watch it come alive Live code Challenge 5-question quiz
  4. Regular expressions basics A regular expression is a pattern that describes text, like \d+ for "one or more digits". Watch it come alive Live code Challenge 5-question quiz

Module 10: Files and errors

5 lessons ยท 0 done
  1. Reading and writing files open(name, mode) opens a file: "w" writes (replacing what was there), "a" appends to the end and "r" reads. Watch it come alive Live code Challenge 5-question quiz
  2. 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. Watch it come alive Live code Challenge 5-question quiz
  3. CSV and JSON CSV stores rows and columns as text with commas, like a spreadsheet, and Python's csv module reads and writes it. Watch it come alive Live code Challenge 5-question quiz
  4. 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. Watch it come alive Live code Challenge 5-question quiz
  5. Raising and custom exceptions raise stops a function and signals a problem, such as raise ValueError("amount must be positive"). Watch it come alive Live code Challenge 5-question quiz

Module 11: Modules and packages

4 lessons ยท 0 done
  1. import and from import brings a module into your program, and you use its contents with a dot: import math, then math.sqrt(16). Watch it come alive Live code Challenge 5-question quiz
  2. 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. Watch it come alive Live code Challenge 5-question quiz
  3. pip and virtual environments pip installs packages from PyPI, such as pip install requests. Watch it come alive Live code Challenge 5-question quiz
  4. if __name__ == "__main__" Every Python file has a built-in variable __name__. Watch it come alive Live code Challenge 5-question quiz

Module 12: Object-oriented Python

8 lessons ยท 0 done
  1. 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. Watch it come alive Live code Challenge 5-question quiz
  2. __init__ and attributes __init__ is a special method that runs automatically when an object is created, and it sets up the object's attributes. Watch it come alive Live code Challenge 5-question quiz
  3. Methods A method is a function defined inside a class. Watch it come alive Live code Challenge 5-question quiz
  4. 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):. Watch it come alive Live code Challenge 5-question quiz
  5. Polymorphism Polymorphism means different classes can be used the same way because they share a method name, even though each does its own thing. Watch it come alive Live code Challenge 5-question quiz
  6. Encapsulation Encapsulation means an object protects its own data and only lets the outside change it in controlled ways. Watch it come alive Live code Challenge 5-question quiz
  7. Dunder methods Dunder methods are special methods with double underscores, like __str__ or __eq__, that Python calls for you in certain situations. Watch it come alive Live code Challenge 5-question quiz
  8. Dataclasses A dataclass is a class mainly for holding data, created with the @dataclass decorator. Watch it come alive Live code Challenge 5-question quiz

Module 13: Advanced Python

4 lessons ยท 0 done
  1. Iterators An iterable is anything you can loop over, such as a list or a string. Watch it come alive Live code Challenge 5-question quiz
  2. Generators A generator is a function that uses yield instead of return. Watch it come alive Live code Challenge 5-question quiz
  3. 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. Watch it come alive Live code Challenge 5-question quiz
  4. Type hints Type hints are optional notes that say what type a value should be, such as def total(prices: list[float]) -> float:. Watch it come alive Live code Challenge 5-question quiz

Module 14: Testing and debugging

4 lessons ยท 0 done
  1. Reading tracebacks A traceback is the report Python prints when an error stops your program. Watch it come alive Live code Challenge 5-question quiz
  2. Debugging step by step Debugging is finding where the program's real behaviour first differs from what you expected. Watch it come alive Live code Challenge 5-question quiz
  3. assert assert condition, "message" checks that a condition is True and raises AssertionError with your message if it is False. Watch it come alive Live code Challenge 5-question quiz
  4. 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. Watch it come alive Live code Challenge 5-question quiz