Beginner · First steps in Python · topic 1 of 50 · 15 min
What programming and Python are
Explanation
A program is a list of instructions
A computer is fast but it cannot guess what you want. It only follows instructions, one after another, exactly as written. A list of such instructions is called a program. Writing programs is called programming or coding.
What is Python?
A programming language is a set of words and rules that both you and the computer understand. Python is one such language. It was created by Guido van Rossum and first released in 1991. Today it is one of the most used languages in the world.
- Easy to read: Python code looks close to plain English.
- Free: you never pay to use Python.
- Used everywhere: Instagram, YouTube and many Indian startups use Python on their servers.
- Huge library: thousands of ready-made tools for maths, dates, data, web and AI.
Your first line of Python
print("Namaste, India!")When you run this, Python reads the line, sees the word print, and shows the text inside the quotes. The text inside quotes is called a string.
How Python runs your code
- You write code in a file or in a box like the one on this page.
- A program called the Python interpreter reads your code line by line, from top to bottom.
- For each line, it does what the line says, then moves to the next line.
- If a line has a mistake, Python stops and shows an error message that tells you the line number.
What can you build with Python?
| Area | Example |
|---|---|
| Automation | Rename 500 photos in one second |
| Websites | The server code behind a shopping site |
| Data | Find the average marks of 2,000 students |
| AI | Train a model that reads handwriting |
Watch the lesson
What programming and Python are · 1/7
Welcome to Python. In this lesson you will find out what programming really is, and why Python is a great first language.
Prefer a video by a teacher? Find free videos on “what is python programming for beginners” on YouTube ↗
In real life: A shopkeeper counting stock
Ramesh runs a small kirana shop. Every evening he counts packets of biscuits, rice and oil by hand. A five-line Python program can add the numbers, warn him when something is running low and print a neat list. That is what programming is: writing the steps once so the computer repeats them perfectly every day.
print("Biscuits: 24 packets")
print("Rice: 8 bags")
print("Oil: 3 bottles - order more!")Practice (0/2 done)
Write a function called greeting() that returns the text "Hello, Python!" exactly (with the capital letters, comma and exclamation mark).
Write a function called shop_name() that returns the text "Ramesh Kirana Store".
Quick quiz
Read more (free)
Pass the quiz (60% or more) or mark this topic as done when you are ready.
Your progress is saved on this device only.