Chapter 1: Introduction to Python

Python basics samjho Hinglish mein - Easy and engaging way!

Python kya hai?

Python ek high-level, interpreted, aur general-purpose language hai.
High-level: Matlab easy to understand syntax.
Interpreted: Line by line execute hota hai.
General-purpose: Har field mein kaam aata hai - Web Dev, AI, Data Science, etc.

Python ke Features

Python Installation

Step 1: Go to python.org
Step 2: Download as per your OS.
Step 3: Install karte waqt “Add Python to PATH” tick zaroor karein.
Step 4: Verify install: python --version ya python3 --version

Python Code Kaise Run Karein?

1. Terminal/Command Line

Direct terminal mein likho:

python

Fir likho:

print("Hello World")
Hello World

2. Using IDEs

VS Code: Lightweight aur customizable.
PyCharm: Best for advanced Python devs.
Jupyter Notebook: Ideal for data visualization.

Python Example Code

Simple print statement:

print("Python is awesome!")
Python is awesome!

Variable ke saath example:

a = 5
b = 3
print("Sum is:", a + b)
Sum is: 8