What Is Python?
Python is one of the easiest and most popular programming languages in the world. It is used for:
- backend web development
- automation & scripting
- AI and machine learning
- game development
- data analysis
- desktop applications
Python is loved because its code looks almost like plain English. Perfect for beginners.
Your First Python Program
The “Hello World” program is the classic first step. It prints text to the screen.
print("Hello, World!")
Explanation:
print()is a built-in Python function- The text inside quotes is displayed on the screen
How to Run Python Code
There are two easy ways:
Method 1: Using Python Installed Locally
- Download Python from python.org
- Install it (check “Add to PATH”)
- Open Notepad
- Paste this code:
print("Hello, World!") - Save as hello.py
- Open CMD and run:
python hello.py
Method 2: Using an Online Python Editor
You can also use:
- Replit
- Trinket
- Google Colab
Just paste the same code and click Run.
Printing Multiple Lines
print("Hello!")
print("Welcome to Python.")
print("This is your second tutorial.")
Variables in Python (Super Simple)
Variables store data. Example:
name = "Kaloyan"
age = 12
print("My name is", name)
print("I am", age, "years old")
This is readable and extremely friendly for beginners.
What’s Next?
In the next tutorial, we start learning real web development with HTML. After that, you’ll be able to build your first webpage.