Python
Python Fundamentals
General-purpose programming with Python, from syntax to testing.
Helpful before you begin (optional -- you can start this course now): How Computing & the Web Work
Who it's for
Learners who want a general-purpose language for scripting, data work, or the backend of AI applications.
What you'll be able to do
- Write Python functions and control flow that solve a stated problem
- Choose the right built-in collection for a given data shape
- Read and write files and handle errors without crashing the program
- Model a problem with classes, and verify behaviour with automated tests
Not started — 8 lessons, no account required.
Start this coursePractice this course →Add to a study plan →Interview questions →
Python basics
Syntax, values, and control flow.
- 20 min
Python Syntax and Basic Types
Write your first Python statements and learn the four building-block types: int, float, str, and bool.
- 22 min
Conditionals and Loops
Make decisions with if/elif/else and repeat work with for and while loops.
- 22 min
Functions: Reusable Blocks of Logic
Package logic into reusable functions using def, parameters, defaults, and return.
Data and structure
Collections and the module system that organises real programs.
Robust programs
Persisting data, surviving errors, modelling with objects, and proving it works.
- 25 min
Files and Exceptions
Handle errors gracefully with try/except/finally and raise, and understand how reading and writing files works.
- 26 min
Classes and Objects
Model real-world things as objects using class, __init__, methods, and attributes.
- 24 min
Testing Fundamentals
Learn why automated tests matter and write simple assert-based tests for your own functions.
Where to go next
Optional -- these build well on what you just learned, but any course can come next.