1. What is Python?
Python is a programming language.
It is used to:
Build websites🌐
Create apps 📱
Do data analysis 📊
Make games 🎮
AI & Machine Learning 🤖
Python is easy because it looks almost like English.
Example:
print("Hello")
It simply prints Hello on the screen.
---
2. Variables (Like Storage Boxes 📦)
A variable stores data.
Example:
name = "Velvet"
age = 18
Here:
name stores text
age stores number
You can use it like:
, print(name)
---
3. Data Types (Types of Data)
Python has different types of data:
Type Example Meaning
int 10 Whole number
float 3.14 Decimal number
str "Hi" Text
bool True True/False
Example:
x=5 # int
y = 2.5 # float
z = "Hello" # string
a = True # boolean
---
4.Taking Input from User 🗣️
If you want the user to enter something:
name = input("Enter your name: ")
print("Hello", name)
⚠️ Important: Input always comes as text (string).
If you want number:
age = int(input("Enter age: "))
---
5. If–Else (Decision Making 🤔)
Python can make decisions.
Example: