Python

1️⃣ What is Python?

Python is a high-level programming language used to tell the computer what to do.

✔ Easy to read
✔ Easy to write
✔ Used by beginners and professionals

Real-life use:

Software development

Websites (Google, Instagram)

Data analysis

Artificial Intelligence

Automation

2️⃣ Why Python is Easy to Learn

Python looks almost like English.

Example:

print("Hello World")

This means → display “Hello World” on the screen

No special symbols, no complicated rules.

3️⃣ Installing Python (Basic Idea)

Download Python from python.org

Install it

Use:

VS Code

IDLE

Command Prompt

(You already use VS Code 👍)

4️⃣ Your First Python Program

print(“Welcome to Python”)
Explanation:
print → built-in function

“Welcome to Python” → text (string)

Output will be:

Welcome to Python

5️⃣ Variables (Storing Data)

A variable stores a value.

name = “Rajan” age = 20

Explanation:

  • name → variable name
  • "Rajan" → value
  • = → assignment operator

6️⃣ Data Types in Python

Python automatically understands data type.

Data TypeExample
int10, 25
float10.5
str“Hello”
boolTrue / False

Example:

price = 99.50

7️⃣ Input from User

name = input(“Enter your name: “)
print(name)
Explanation:
input() → takes data from user

Stores it in name

8️⃣ Operators

Used to perform operations.

Arithmetic Operators

a = 10
b = 5
print(a + b)
OperatorMeaning
+Addition
Subtraction
*Multiplication
/Division

9️⃣ Conditional Statements (Decision Making)

Python checks conditions using if / else.

age = 18

if age >= 18:
    print("Eligible to vote")
else:
    print("Not eligible")

Explanation:

  • if checks condition
  • else runs when condition is false

🔟 Loops (Repeat Work)

For Loop
for i in range(1, 6):
    print(i)

Output:

1
2
3
4
5
While Loop
i = 1
while i <= 5:
    print(i)
    i += 1

Functions

A function is a block of reusable code.

def greet():
    print("Hello Python")

greet()
Python Keywords

hese are reserved words — cannot be used as variable names.

Some important ones:

if, else, for, while, break, continue,
True, False, None,
def, return, class, import

Summary

Python is simple
✔ Easy to understand
✔ Powerful language
✔ Best for beginners



  • by
    mahalakshmi
  • February 10, 2026

Tags:

Share:

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

THE COMPLETE STORY: Building Your First Website Welcome, Future Web Developers! Teacher: “Imagine you’re about to build something amazing – your...
🏛️ PART 1: WHY A WEBSITE MATTERS IN 2026 – The “Digital Storefront”  Your Shop on Commercial Street  “Imagine you...
IT-Foundation:
👉 Social Media is not an app.👉 It is a Digital Identity System. Social Media =Attention + Content + Trust...