Level 1: Problem Solving Basics (PPS)

What is it? Problem solving is the process of breaking down a complex task into clear, logical steps.

Explanation: Before writing code, we plan. We use an Algorithm (step-by-step text instructions) or a Flowchart (visual diagram of steps).

Example Logic: Find Greatest of 3 Numbers


a = 10

b = 20

c = 15

if a > b and a > c:

    print("a is greatest")

elif b > c:

    print("b is greatest")

else:

    print("c is greatest")

Try This 🔥

Change the values of a, b, and c to see how the logical flow adapts to find the new highest number.

✅ You learned this concept!

Level 2: Introduction to Python

What is it? Python is a high-level, extremely readable programming language widely used in AI, Data Science, and Web Development.


print("Hello World")

Explanation: Unlike C or Java, Python doesn't require complex syntax or semicolons to print text to the screen.

Try This 🔥

Modify the text inside the quotes to print your name instead of "Hello World".

Try in Compiler ▶

✅ You wrote your first Python program!

Level 3: Variables & Data Types

What is it? Variables are containers for storing data values. Python automatically detects the data type.


x = 10

name = "Rajan"

marks = 85.5

Explanation: x is an integer. name is a string. marks is a float (decimal). Python figures this out without you declaring it.

Try This 🔥

Create a variable for your current age and print it.

Try in Compiler ▶

✅ You learned this concept!

Level 4: Operators

What is it? Symbols used to perform mathematical or logical operations on variables.


x = 10

y = 5

result = x + y

print(result)

Explanation: Python supports standard math operators like +, -, *, /, and % (remainder).

Try This 🔥

Change the operator from + to * and check the new output.

Try in Compiler ▶

✅ You learned this concept!

Level 5: Conditionals

What is it? Decision-making logic that runs code only if a specific condition is True.


x = 10

if x > 0:

    print("Positive")

Explanation: In Python, we use indentation (spaces) instead of curly braces {} to define blocks of code.

Try This 🔥

Add an else: block below it to print "Negative" if x is below zero.

Try in Compiler ▶

✅ You learned this concept!

Level 6: Loops

What is it? A way to repeat a block of code multiple times automatically.


for i in range(5):

    print(i)

Factorial Program (PPS Syllabus)


result = 1

for i in range(1, 6):

    result = result * i

print(result)

Explanation: The range(5) function generates numbers from 0 to 4. For the factorial, we loop from 1 to 5, multiplying the result each time.

Try This 🔥

Change the range in the factorial program to find the factorial of 3.

Try in Compiler ▶

✅ You learned this concept!

Level 7: Functions

What is it? Reusable blocks of code that only run when they are called.


def add(a, b):

    return a + b

answer = add(5, 3)

print(answer)

Explanation: We use the def keyword to create a function. It takes inputs (parameters) and can return an output.

Try This 🔥

Create a function called `multiply(a, b)` and test it.

Try in Compiler ▶

✅ You learned this concept!

Level 8: Data Structures (Very Important)

What is it? Specialized formats for organizing, processing, and storing multiple values in Python.


numbers = [1, 2, 3]

person = {"name": "Rajan", "age": 18}

print(numbers[0])

print(person["name"])

Try This 🔥

Add your own name and age to the dictionary, then print your age.

Try in Compiler ▶

✅ You learned this concept!

Level 9: Error Handling

What is it? Safely managing errors so your program doesn't crash unexpectedly.


try:

    x = 10 / 0

except:

    print("Error: Cannot divide by zero")

Explanation: The code inside the try block is tested. If it causes an error (like dividing by zero), the except block catches it and runs instead.

Try This 🔥

Change the code to divide by 2 instead of 0, and see what happens.

Try in Compiler ▶

✅ You learned this concept!

Level 10: NumPy (Real-world Python)

What is it? A powerful external library used for working with large, multi-dimensional arrays and mathematical functions.


import numpy as np

arr = np.array([1, 2, 3, 4])

print(arr.shape)

print(arr.size)

Explanation: shape tells you the dimensions (rows/columns) of the array. size tells you the total number of elements inside it.

Try This 🔥

Create a new numpy array with 5 numbers and print its shape.

Try in Compiler ▶

✅ You learned this concept!

Level 11: Pandas (Real-world Python)

What is it? A library used for data manipulation and analysis, primarily through DataFrames (like Excel tables).


import pandas as pd

data = {"name": ["Alice", "Bob"], "age": [20, 22]}

df = pd.DataFrame(data)

print(df)

Explanation: We take a dictionary and convert it into a neat, tabular DataFrame. This is the foundation of Data Science in Python.

Try This 🔥

Add a third person's name and age to the dictionary and print the new DataFrame.

Try in Compiler ▶

✅ You learned this concept!

Level 12: Practical Programs

What is it? Standard implementations combining logic, loops, and data structures.

1. List Operations


fruits = ["Apple", "Banana"]

fruits.append("Orange")

print(fruits)

2. Simple Data Handling (Dictionaries in Lists)


students = [
    {"name": "Rajan", "marks": 85},
    {"name": "Aman", "marks": 90}
]

for s in students:

    print(s["name"])

Try This 🔥

Combine these logic snippets inside a new file to practice list and dictionary manipulation.

Try in Compiler ▶

✅ You learned this concept!

Ready to master Python?

Start Python Quiz 🚀