
By the tiswa editorial team, from the official sources listed at the end of this guide. How we write our guides
Learn Python from scratch is the first thing most students search for when they decide to code, and for good reason. Python reads close to plain English, and it is used in data analysis, AI, automation, the web and scientific research. Whether you study computer science, engineering, business or biology, Python will help you. And everything you need to start is free.
Where to learn Python for free
| Resource | Language | Best for | Note |
|---|---|---|---|
| Satr | Arabic | Starting from zero in Arabic | Completely free, with a badge on your profile after each course |
| Harvard CS50 Python | English | A structured, university-style course | Free via OpenCourseWare, ten weeks, a browser is enough |
| Official Python tutorial | English | After you know programming basics | Written for programmers new to Python, not beginners new to programming |

CS50's Introduction to Programming with Python is designed for students with or without prior experience. It covers functions, variables, conditionals and loops, then exceptions, testing, libraries, regular expressions, classes and files. Each week has a lecture, short videos and a problem set to submit. If you want a verified certificate, that is a separate option through edX. The official Python tutorial describes itself as written for programmers who are new to the language, so keep it as a reference for later.
Install Python and write your first program
- Download Python
Go to python.org/downloads and download the latest version for your machine, Windows or macOS.
- Install
Run the installer. On Windows, tick the option to add Python to PATH if it appears.
- Open IDLE
Python comes with IDLE, its own Integrated Development and Learning Environment. Open it from your apps.
- Write your first line
In the IDLE window type print("Hello") and press Enter. If the text appears, congratulations, you wrote your first program.
- Save a file
From File choose New File, write your program, save it as something like hello.py, and run it from Run.

An 8 week plan
One hour a day, five days a week. Each week ends with a small project you upload to GitHub.
| Week | Topic | Project |
|---|---|---|
| 1 | print, variables, types and input | A program that asks your name and age and replies |
| 2 | if, else and logic | A GPA calculator that gives you your grade |
| 3 | for and while loops | A number guessing game |
| 4 | Lists and dictionaries | A to-do list you can add to and remove from |
| 5 | Functions | Split week 4's program into tidy functions |
| 6 | Files and errors | Save the to-do list to a file and handle bad input |
| 7 | Libraries | A program that reads a CSV file and prints a summary |
| 8 | A project from your major | A tool that solves a real problem in your studies |
Project ideas by major
- Business and accounting: a program that reads your monthly spending from a file and works out the percentages.
- Engineering: a calculator for formulas from a course you are taking this term.
- Health sciences: a tool that converts between lab units.
- Computer science: a simple bot that answers frequent questions.
- Any major: a program that builds your study schedule around exam dates.
If you get stuck, use AI as a tutor, not a homework solver. Here is a template that helps:
I am learning Python from scratch and I have reached [topic]. Here is my code and the error I get: [paste code and error]. Do not write the solution. Ask me one question that brings me closer to understanding the problem, wait for my answer, then give me a hint. When I solve it, give me a slightly harder exercise on the same idea.
How to tell you are improving
Progress in coding is not the number of lessons you watched, it is the programs you can write on your own. Signs you are on track: you can write the week's program without checking the lesson on every line, you understand an error message and fix it, and you can explain to a classmate what your code does. For a clearer measure, solve the CS50 problem sets yourself and submit them, or try challenges on Tuwaiq Academy's CoderHub with your Satr account.
Beginner mistakes
- Watching lots of lessons and writing little code. The rule: type every lesson yourself and change it.
- Jumping to another language before the basics are solid. Stay with Python until the plan is done.
- Being scared of error messages. Read the last line first, it usually tells you exactly what is wrong.
- Copying ready-made solutions. If you copy one, close it and write it again from memory.
After Python, what next?
Once the basics are done, pick a direction: learn data analysis if you like numbers, learn SQL to work with databases, or learn HTML and CSS if you want to build websites. Put everything on GitHub from day one, read GitHub for beginners. The full picture is in how to learn programming from zero.
Your first error messages and what they mean
SyntaxError usually means a typo in the line, such as a missing bracket or colon. IndentationError means the spaces at the start of a line are wrong. NameError means you used a name you never defined or spelled it differently. TypeError means an operation on two types that do not fit, such as adding text to a number. Read the last line of the error first; it names the error, and the line above it shows where.





