1. Introduction to Python

Python ek high-level programming language hai jo Guido Van Rossum ne banayi thi. Ye simple English jaisi hai aur bahut powerful hai.

# First Python Program
print("Hello, World!")
print("Welcome to Class 11 CS")

2. Conditional Statements (if-else)

Decision lene ke liye hum if-else ka use karte hain. Jaise "Agar barish hui toh umbrella lo, varna mat lo".

age = int(input("Enter your age: "))

if age >= 18:
    print("You are eligible to vote!")
else:
    print("You are NOT eligible to vote.")

3. Loops (for, while)

Kisi kaam ko bar-bar repeat karne ke liye loop use hota hai.
for loop: Sequence par chalta hai.
while loop: Condition true hone tak chalta hai.

# Printing numbers 1 to 5
for i in range(1, 6):
    print(i)
Google Ad Here

Quiz Time!

Q1. Who developed Python?

(a) Dennis Ritchie (b) Guido Van Rossum (c) James Gosling (d) Bjarne Stroustrup

Q2. Which keyword is used for loops?

(a) loop (b) repeat (c) for (d) next