CBSE 2026 results are out, Mukul scored a perfect 100/100 in Computer ScienceSee all toppers →
CBSE Class 11 · Informatics Practices · Practical

CBSE Class 11 Informatics Practices Practical File, Python and SQL with Output

The CBSE Class 11 Informatics Practices (065) practical file mixes Python basics, an introduction to pandas, and SQL. Every program below was run and its output captured, so what you copy is what it will print.

1. Print a table of a number using a loop

Program
n = 7
for i in range(1, 11):
    print(n, "x", i, "=", n * i)
Output
7 x 1 = 7
7 x 2 = 14
7 x 3 = 21
7 x 4 = 28
7 x 5 = 35
7 x 6 = 42
7 x 7 = 49
7 x 8 = 56
7 x 9 = 63
7 x 10 = 70

2. Find the average of numbers entered in a list

Program
marks = [72, 85, 66, 90, 58]
print("Marks:", marks)
print("Average:", round(sum(marks) / len(marks), 2))
Output
Marks: [72, 85, 66, 90, 58]
Average: 74.2

3. Swap two variables without a third variable

Program
a, b = 15, 40
print("Before swap: a =", a, ", b =", b)
a, b = b, a
print("After swap : a =", a, ", b =", b)
Output
Before swap: a = 15 , b = 40
After swap : a = 40 , b = 15

4. Create a pandas Series from a dictionary

Program
import pandas as pd
s = pd.Series({"Maths": 88, "Science": 74, "English": 91})
print(s)
print("Total:", s.sum())
Output
Maths      88
Science    74
English    91
dtype: int64
Total: 253

5. Display the first and last rows of a DataFrame

Program
import pandas as pd
df = pd.DataFrame({"City": ["Ahmedabad", "Surat", "Rajkot", "Vadodara"],
                   "Students": [120, 90, 64, 78]})
print("First two rows:")
print(df.head(2))
print("Last row:")
print(df.tail(1))
Output
First two rows:
        City  Students
0  Ahmedabad       120
1      Surat        90
Last row:
       City  Students
3  Vadodara        78

6. Count how many values are above average

Program
import pandas as pd
df = pd.DataFrame({"Marks": [78, 91, 45, 66, 88]})
avg = df["Marks"].mean()
print("Average:", avg)
print("Above average:", int((df["Marks"] > avg).sum()), "students")
Output
Average: 73.6
Above average: 3 students

7. SQL: create a table and filter with WHERE

Program
CREATE TABLE books(id INTEGER, title TEXT, price INTEGER);
INSERT INTO books VALUES (1,'Python Basics',450),(2,'SQL Simplified',320),
                         (3,'Data Handling',560);
SELECT title, price FROM books WHERE price > 400;
Output
    title      price
-------------  -----
Python Basics    450
Data Handling    560

8. SQL: UPDATE and DELETE a row

Program
CREATE TABLE books(id INTEGER, title TEXT, price INTEGER);
INSERT INTO books VALUES (1,'Python Basics',450),(2,'SQL Simplified',320);
UPDATE books SET price = 400 WHERE id = 1;
DELETE FROM books WHERE id = 2;
SELECT * FROM books;
Output
id      title      price
--  -------------  -----
 1  Python Basics    400

Get the full practical-file pack, free

Every program, the exact practical-file format your school expects, and the viva questions that come up most — sent on WhatsApp.

Get it on WhatsApp Book a free demo class

Related: Class 11 IP syllabus · IP Class 11 weightage · Class 12 IP practical file

Stuck on your practical file or the viva?

Kajal Ma'am has been teaching these practicals since 2004. See a real class first — no payment, no commitment.

Book a free demo class

Every program on this page was executed and its output captured from the run. Curated by Kajal Ma'am (MCA), teaching computer subjects since 2004.

Frequently asked questions

What is in the Class 11 IP practical list?

Python programs on loops, lists and simple calculations, an introduction to pandas Series and DataFrames, and basic SQL — creating tables, inserting rows, and querying with WHERE, UPDATE and DELETE.

How many programs should the file have?

Most schools ask for 10 to 15 programs across Python and SQL for Class 11. Check your teacher's list, because the split between Python and SQL varies by school.

Is the output on this page real?

Yes. Each program was executed and the output copied from the run, including the SQL, which was run against a real database.

{ }

Frequently asked questions

How many programs are needed in the CBSE Class 12 CS practical file?+
As per CBSE, the report file should contain a minimum of 15 Python programs and 5 sets of SQL queries. The practical is 30 marks (lab test 12, report file 7, project 8, viva 3).
Are these programs part of the CBSE syllabus?+
Yes, these are standard CBSE Class 12 Computer Science (083) practical concepts: stacks, file handling, recursion, searching, dictionaries and Python-MySQL connectivity. Every program here has been run and its output verified.
Can I get the full practical file and viva questions?+
Yes, request the full pack (15+ programs, the CBSE practical-file format and likely viva questions) on WhatsApp, free. Kajal Ma'am's team can also guide you through your own file.

Want to ace your boards?

See a real class before you decide. No pressure, no payment.

Book Free Demo on WhatsApp

Studying outside India?

We coach CBSE, IGCSE & international students across the globe, one-to-one, in your local time zone.

Visit International →