Learn Python Free in Your Browser: Basics, Files, Classes, pandas and FastAPI (English and Arabic)
NeedMyTools Academy
Start free: sign in first
One free account opens every full lesson, the graded tests, your progress on any device and a certificate of completion. Sign in with an email code or Google in under a minute.
- Full lessons and exercises
- Graded tests that unlock the next lesson
- Certificate with a QR code anyone can verify
Free forever. No card, no paywall.
Already signed in? The same button opens your panel.
Just looking? Each lesson shows a short preview without an account.
Python is the language people reach for when they want to automate a boring task, clean a spreadsheet, analyse data or build the back end of a web app. Its code reads almost like English, it has no curly braces or semicolons, and the same skills carry from a ten-line script to machine learning. This course starts from zero and runs real Python in your browser: press Run on any example and the output appears under it, with errors pointing to the exact line. You do not need to install anything to start, and every lesson uses Gulf examples such as VAT receipts in dirhams, delivery fees and product records.
Quick answer
Learn Python in this order: values, variables, `print()` and f-strings; conditions with `if` and loops with `for` and `while`; lists, dictionaries and sets; then functions and modules, files and exceptions, classes, data with pandas and web APIs. All eight lessons are published, each with an exercise with automatic checks and a quiz. Lessons one to seven run real Python 3.14 and pandas in your browser; the FastAPI lesson, the final project, shows real recorded server output. Pass the graded tests for a free certificate.
- Level:
- Complete beginner, no experience needed
Lessons
- 1Values, variables and printPrint text, numbers and Arabic and check a value’s type · Store values in variables and calculate with Python’s operators · Format output with f-strings and convert between text and numbers35 min
- 2Conditions and loopsWrite if, elif and else branches with comparisons and and/or · Repeat work with for, range and while · Control loops with break and continue and read indentation errors35 min
- 3Lists, dictionaries and setsCreate, index, slice, sort and transform lists · Read, update and loop over dictionaries safely with get() and items() · Remove duplicates and compare groups with sets40 min
- 4Functions and modulesWrite functions with def, return, default and keyword arguments · Return several values and explain local scope · Import and use standard library modules such as math and datetime40 min
- 5Files, errors and exceptionsCatch specific exceptions with try, except, else and finally · Raise clear errors from your own functions · Read and write text, CSV and JSON files safely with UTF-840 min
- 6Classes and objectsWrite classes with __init__, attributes and methods · Control printing and operators with __str__, __repr__ and __add__, and use dataclasses · Extend a class with inheritance and super()40 min
- 7Data with pandasBuild and inspect a DataFrame and add calculated columns · Filter and sort rows with conditions · Read CSV data, handle missing values and summarise with groupby45 min
- 8Web APIs with FastAPICreate GET routes with path and query parameters in FastAPI · Return the right status codes with HTTPException and status_code · Validate JSON bodies with Pydantic models and read the generated docs45 min
NeedMyTools Academy
Sign in with a free account (email code or Google, no password) to open every lesson in full. Each lesson ends with a short test graded on our server, and the next lesson only unlocks after you pass. Pass the module tests, the final project and the final exam to get a certificate of completion with a transcript that anyone can check on this site. Without an account you can read a short preview of each lesson.
How grading works
- Each lesson: pass the exercise (checked on our server), then a 5-question test with 4 correct. The test opens after you have spent some time on the lesson.
- Three fails in a row lock that test for 30 minutes. Leaving a test unfinished counts as a fail.
- Each module ends with a 10-question test (7 to pass, 3 tries a day). The course ends with the project and a 25-question final exam (18 to pass, 3 tries a day).
- Questions are drawn at random and many have values that change for every student, so sharing answers does not help.
- The certificate says what it is: a certificate of completion for an unsupervised online assessment, not a degree or an accredited qualification.
What you will be able to do
- Write and run Python that prints clear, formatted output
- Make decisions and repeat work with if, for and while
- Store and process data with lists, dictionaries and sets
- Read Python error messages and fix the line they point to
Who this course is for
Anyone who has never programmed and wants a first language, students preparing for university computing courses, accountants and analysts who want to automate spreadsheets, and web developers who know JavaScript and want a second language for scripts, data and back ends. The examples run on a phone, but a laptop with a keyboard makes typing code much easier.
How Python runs in your browser
The examples use Pyodide 314.0.8, an open source build of the standard CPython interpreter, version 3.14, compiled to WebAssembly so it runs inside the page. It is the same Python you would install on a computer, not a simplified imitation, so the code you learn here works unchanged in a terminal. The first time you press Run, your browser downloads about 6 MB of Python files from a public CDN, which takes a few seconds on mobile data; after that, the browser cache makes later runs fast. Your code never leaves your device: it runs in a sandboxed frame with no access to your files or accounts. One limit: `input()` cannot pause the page to ask you a question, so the examples set values in variables instead.
How each lesson is built
Every lesson explains one group of ideas in short sections, and each section ends with a live example. The note under each example states the exact output it printed when we ran it in Python 3.14, so you can compare and then change the code to test your understanding. The exercise gives you starter code and checks your answer automatically, and the hints point to the line that is missing. A short quiz and a list of common mistakes close the lesson, and the sources link to the official Python documentation that each claim was checked against.
When to install Python on your computer
You can finish the first lessons entirely in the browser. Install Python from python.org, or through your system package manager, when you want to work with files on your own disk, run scripts on a schedule or use packages that need a server. Pick the latest stable 3.x release, tick the option to add Python to PATH on Windows, and use a free editor such as VS Code with its Python extension. Later lessons on files, pandas and web APIs show the commands for a local setup, side by side with what runs in the browser.
Questions about this course
Is this Python course free and available in Arabic?
Yes. Every lesson, live example, exercise and quiz is free in English and Arabic, with no signup needed to read or run code. Python keywords and code stay in English because that is how you type them.
Should I learn Python or JavaScript first?
Choose by goal. For websites and anything that runs in the browser, start with JavaScript. For automation, data analysis, science or a first taste of programming with very readable code, start with Python. The core ideas of variables, conditions, loops and functions transfer between them.
Does the in-browser Python work offline?
The first Run needs a connection to download Python. After that, the files usually stay in your browser cache, but the lesson page itself still needs to load, so plan to be online while you study.
Which Python version does this course teach?
Python 3, and the examples run on 3.14. Python 2 reached its end of life in 2020, so do not follow tutorials that write `print "hello"` without brackets. Everything here also works on any recent 3.x release.
How long does it take to learn Python basics?
Each lesson takes about 30 to 40 minutes with the exercise. With one lesson a day, the basics in the first six lessons take about a week, and confidence comes from writing small scripts of your own after that.
Code examples stay in English and run in a sandbox on your device. If you spot a mistake, tell us through the contact page.