Python Tutorial
Python is a popular programming language that is easy to read and easy to write. It looks almost like plain English, which makes it a great first language.
People use Python to build websites, automate boring office work, analyse data, and create artificial intelligence (AI) programs. Companies like Google, Netflix and Instagram use it every day.
This tutorial starts from zero. Every lesson is short, uses simple English, and shows the code together with the result it prints.
Why Learn Python?
- The code is short and clean, so you spend more time solving problems and less time fighting the language
- It is free and works on Windows, macOS and Linux
- It has thousands of ready-made libraries for data, AI, web and automation
- Python developers are in demand, both in Pakistan and in freelancing markets
A First Example
Example
name = "Ayesha"
print("Assalam o Alaikum,", name)
print("Welcome to Python!")Assalam o Alaikum, Ayesha Welcome to Python!
Two lines of real work, and the program already greets a person by name.
What You Will Learn
- Installing Python and running your first program
- Syntax, comments, variables and data types
- Numbers, strings, booleans and operators
- Lists, tuples, sets and dictionaries
- Decisions with if/else and repetition with loops
- Functions, classes and objects
- Modules, pip, working with files, and handling errors
Exercises and Quiz
Most lessons end with a short exercise. The last lesson has a quiz on the whole tutorial.
Exercise
Which function shows text on the screen in Python?
What to Learn After Python
Once you know the basics, move on to data work with NumPy for fast number arrays, Pandas for tables of data, and SciPy for science and statistics. If you like statistics, R is another language worth a look.
Want to learn with a teacher? The Workownix Python Programming course takes you from the basics to real projects, online or at our institute in Orangi Town, Karachi.
