CBSE Class 12 · Informatics Practices 065 · Written practice for 2027

Class 12 IP important questions, unit by unit and mark by mark.

These 58 class 12 IP important questions are new, and each one wears its marks in front: from a single value for one mark to a whole DataFrame for five. The pandas answers were run, the two charts were drawn by the code beside them, and the SQL came back from MySQL. Work with a pen first, since the paper gives you no screen.

pandas 24 with charts · MySQL 18 · networks 8 · society 8 · live classes are one to one, at your own timing

Start here

If one unit of the bank keeps beating you

Students rarely miss questions evenly. These three courses cover the whole subject, the pandas side and the SQL side.

Ans. The short version

Class 12 IP important questions for CBSE Informatics Practices (065) come from pandas and data visualization (25 marks), SQL (25), computer networks (10) and societal impacts (10). Prepare Series and DataFrame outputs, Boolean indexing, CSV import and export, one program for each plot, SQL functions, GROUP BY with HAVING, an equi-join, a network case and short society answers. This page has 58 original questions of 1 to 5 marks with answers; CBSE itself names no such list. Modern Age Coders practises them live, personalised one to one, and a priority demo lets you try a full class first.

1. Find your questions

Which questions are important for the Class 12 IP board exam?

The ones that match the syllabus line by line at the marks the paper uses. CBSE publishes no list of important questions, so treat any list, including this one, as practice and never as a prediction.

Unit1 mark2 marks3 marks4 marks5 marks
1. pandas1 to 45 to 1011 to 15none16, 17
1. Data visualization18, 1920, 212223, 24none
2. SQL25 to 2829 to 3334 to 3738 to 4041, 42
3. Networks43, 4445 to 49nonenone50
4. Society51, 5253 to 5657, 58nonenone

How much should you write?

MarksWhat a full answer holdsTime
1A word, a value or one line of code1 to 2 minutes
2Two points, or a statement with its reason4 to 5 minutes
3Three separate statements, queries or outputs7 to 8 minutes
4One chart program, or two queries on two tables10 minutes
5Five parts of one mark, or 3 + 1 + 112 to 13 minutes

Why these times

The paper gives 180 minutes for 70 marks, a little over two and a half minutes a mark. The times in the table are our own working figures, and they leave something for reading and for checking brackets.

In the 2026-27 sample paper, the five-mark questions were a network case, a DataFrame question and an SQL question with a choice. The four-mark ones were a chart program and two tables joined. Questions 16, 17, 23, 24, 38, 39, 41, 42 and 50 here are of those kinds. For the paper as a whole, go to the IP practice paper.

2. Unit 1, first half

Class 12 IP pandas important questions with answers

Most pandas marks go on three skills: reading labels correctly, knowing where NaN appears, and changing a DataFrame in one statement. Questions 1 to 17 go from one to five marks.

One mark

  1. [1] Write one statement that makes a Series named tank with the value 50 at each of the labels Mon, Wed and Fri.
    Answer tank = pd.Series(50, index=['Mon', 'Wed', 'Fri']). A single (scalar) value is repeated for every label, so the index has to be given.
  2. [1] What does this display?
    Q2tail, then head
    import pandas as pd
    s = pd.Series([6, 9, 2, 7, 5])
    print(s.tail(3).head(1))
    Answer
    Outputpandas 2.3
    2    2
    dtype: int64
    tail(3) keeps labels 2, 3 and 4. head(1) then keeps the first of those three.
  3. [1] A DataFrame has 5 rows and 4 columns. What are its shape and size?
    Answer shape is (5, 4) and size is 20. The row count always comes first in shape.
  4. [1] What values are in the Series given by pd.Series(["ab", "c"]) * 2?
    Answer abab and cc. The operation is applied to each value, and a string multiplied by 2 is repeated.

Two marks

  1. [2] Give two differences between a Series and a DataFrame.
    Answer A Series is one-dimensional and has one index; a DataFrame is two-dimensional and has row labels and column labels. A Series has a single dtype; in a DataFrame each column may have its own. One mark for each difference.
  2. [2] Predict the output and explain why the numbers have a decimal point.
    Q6index given with a dictionary
    import pandas as pd
    d = {"Jan": 12, "Mar": 7}
    print(pd.Series(d, index=["Mar", "Apr", "Jan"]))
    Answer
    Outputpandas 2.3
    Mar     7.0
    Apr     NaN
    Jan    12.0
    dtype: float64
    The index list decides the order. Apr is not a key, so it gets NaN, and since NaN is a float the whole Series becomes float64. One mark for the output, one for the reason.
  3. [2] Rewrite the code after removing all four errors. Underline each correction.
    Q7four errors
    import Pandas as pd
    honey = pd.series([14, 9, 17] index=["H1", "H2", "H3"])
    print(honey["H1":"H2"]
    Answer
    Q7 correctedhalf a mark each
    import pandas as pd                                      # 1. small p
    honey = pd.Series([14, 9, 17], index=["H1", "H2", "H3"]) # 2. capital S, 3. comma
    print(honey["H1":"H2"])                                  # 4. closing bracket
  4. [2] The DataFrame hive has the labels 0 to 3. How many rows come from hive[1:3] and from hive.loc[1:3]? Why?
    Answer Two and three. A plain slice goes by position and leaves out the end, so it gives rows 1 and 2. loc goes by label and includes both ends, so it gives rows 1, 2 and 3.
  5. [2] Write a loop that prints each hive number with its weight, one row per line, from the DataFrame hive (columns Hive, Village, Kg).
    Answer
    Q9iteration over rows
    for label, row in hive.iterrows():
        print(row["Hive"], row["Kg"])
    Output
    H1 14
    H2 9
    H3 17
    H4 11
  6. [2] What do the two arguments do in hive.to_csv("h.csv", sep=";", index=False)?
    Answer sep=";" puts a semicolon between values and not a comma. index=False leaves the row labels out of the file, so that no extra unnamed column appears when the file is read again.

Three marks: Series

  1. [3] Write a program to make a Series from a NumPy array of 2.4, 3.1, 1.8 and 2.9 with the labels Asha, Binu, Chan and Devi. Display (i) only the values above 2.5 and (ii) all the values raised by 0.5.
    Answer
    Q11ndarray, filter, arithmetic
    import pandas as pd
    import numpy as np
    weights = np.array([2.4, 3.1, 1.8, 2.9])
    s = pd.Series(weights, index=["Asha", "Binu", "Chan", "Devi"])
    print(s[s > 2.5])
    print(s + 0.5)
    Outputpandas 2.3
    Binu    3.1
    Devi    2.9
    dtype: float64
    Asha    2.9
    Binu    3.6
    Chan    2.3
    Devi    3.4
    dtype: float64
    One mark each for the Series, the filter and the addition.
  2. [3] A tea stall notes what it made and what it sold. Predict the output and say how you would tell from it which items were not in both lists.
    Q12aligned subtraction
    import pandas as pd
    made = pd.Series({"idli": 40, "vada": 25, "bun": 30})
    sold = pd.Series({"idli": 34, "bun": 30, "puff": 8})
    print(made - sold)
    Answer
    Outputpandas 2.3
    bun     0.0
    idli    6.0
    puff    NaN
    vada    NaN
    dtype: float64
    Two marks for the output, one for the reason. Values are matched by label. vada and puff appear in only one Series, so they show NaN. The result has all four labels, in sorted order here.

Three marks: DataFrame

  1. [3] Predict the output, then state the shape of df.
    Q13list of dictionaries
    import pandas as pd
    rows = [{"Bee": "Cerana", "Boxes": 6},
            {"Bee": "Dorsata", "Wild": "yes"},
            {"Bee": "Mellifera", "Boxes": 15}]
    df = pd.DataFrame(rows)
    print(df)
    Answer
    Outputpandas 2.3
             Bee  Boxes Wild
    0     Cerana    6.0  NaN
    1    Dorsata    NaN  yes
    2  Mellifera   15.0  NaN
    Shape (3, 3). Each dictionary is one row and the keys become columns. Missing keys give NaN, and that turns Boxes into decimals.
  2. [3] hive is the DataFrame below.
    HiveVillageKg
    0H1Thally14
    1H2Denkani9
    2H3Thally17
    3H4Hosur11
    Write statements to (i) add a column Jars holding Kg multiplied by 2, (ii) remove the row labelled 1, (iii) change the column name Kg to Weight. Show the table after all three.
    Answer
    Q14three marks
    hive["Jars"] = hive["Kg"] * 2
    hive = hive.drop(1, axis=0)
    hive = hive.rename(columns={"Kg": "Weight"})
    print(hive)
    Outputpandas 2.3
      Hive Village  Weight  Jars
    0   H1  Thally      14    28
    2   H3  Thally      17    34
    3   H4   Hosur      11    22
    Label 1 is gone and nothing is renumbered. inplace=True in (ii) and (iii) is equally correct.
  3. [3] Using hive from Question 14, before it was changed, write statements to display (i) the rows of Thally, (ii) Hive and Kg of hives that gave more than 10 kg, (iii) hives of Thally that gave more than 15 kg.
    Answer
    Q15Boolean indexing
    print(hive[hive["Village"] == "Thally"])
    print(hive.loc[hive["Kg"] > 10, ["Hive", "Kg"]])
    print(hive[(hive["Village"] == "Thally") & (hive["Kg"] > 15)])
    Outputpandas 2.3
      Hive Village  Kg
    0   H1  Thally  14
    2   H3  Thally  17
      Hive  Kg
    0   H1  14
    2   H3  17
    3   H4  11
      Hive Village  Kg
    2   H3  Thally  17
    Use & between two conditions, with each condition in round brackets.

Five marks

  1. [5] (i) Make the DataFrame team from a dictionary of Series.
    PlayedWon
    Reds85
    Blues83
    Greens76
    (ii) Add a row Golds with 7 and 2. (iii) Display the column Won only. (3 + 1 + 1)
    Answer
    Q16dictionary of Series
    import pandas as pd
    names = ["Reds", "Blues", "Greens"]
    data = {"Played": pd.Series([8, 8, 7], index=names),
            "Won": pd.Series([5, 3, 6], index=names)}
    team = pd.DataFrame(data)
    print(team)
    
    team.loc["Golds"] = [7, 2]
    
    print(team["Won"])
    Output of both printspandas 2.3
            Played  Won
    Reds         8    5
    Blues        8    3
    Greens       7    6
    Reds      5
    Blues     3
    Greens    6
    Golds     2
    Name: Won, dtype: int64
    The same index has to be given to both Series. With different labels you would get extra rows and NaN.
  2. [5] hives.csv holds a heading line, then H1,Thally,14 and H2,Denkani,9 and H3,Thally,17 and H4,Hosur,11. Write a program to read it, display the first two rows, add a column Income at 450 per kilogram, and save only Hive and Income in income.csv without the row labels. (1 + 1 + 1 + 2)
    Answer
    Q17CSV in, CSV out
    import pandas as pd
    hive = pd.read_csv("hives.csv")
    print(hive.head(2))
    hive["Income"] = hive["Kg"] * 450
    short = hive[["Hive", "Income"]]
    short.to_csv("income.csv", index=False)
    print(open("income.csv").read())
    Output, then the new filepandas 2.3
      Hive  Village  Kg
    0   H1   Thally  14
    1   H2  Denkani   9
    Hive,Income
    H1,6300
    H2,4050
    H3,7650
    H4,4950
    The last line only shows what was saved; it is not needed for the marks. Two pairs of square brackets pick two columns as a DataFrame.

The chapters in full: pandas Series and DataFrame.

3. Unit 1, second half

Data visualization: important questions on line, bar and histogram

Learn one complete program for each of the three plots. The syllabus names line plot, bar graph and histogram, with label, title and legend, so pie charts and scatter plots can be left alone.

Short questions

  1. [1] Name the Matplotlib function that stores a plot as an image file.
    Answer savefig(), as in plt.savefig("honey.png"). Call it before show().
  2. [1] A nurse has one patient's temperature for each of 30 days. Which of the three plots in the syllabus should she draw?
    Answer A line plot. The readings follow one another in time, and a line shows the rise and fall.
  3. [2] Give two differences between a bar graph and a histogram.
    Answer A bar graph compares separate categories, and a histogram shows how many values of one numeric list fall in each interval. Bars of a bar graph have gaps between them, while the bars of a histogram touch because the intervals are continuous. One mark each.
  4. [2] This program draws the line but shows neither the axis name nor a useful legend. Find the two faults and correct them.
    Q21two faults
    import matplotlib.pyplot as plt
    plt.plot([1, 2, 3], [18, 24, 21])
    plt.xlabel = "Day"
    plt.legend()
    plt.show()
    Answer plt.xlabel("Day"): it is a function, so it is called with brackets and not assigned. plt.plot([1, 2, 3], [18, 24, 21], label="Riders"): legend() has nothing to list until a plot carries a label.
  5. [3] The marks of 12 students are 42, 55, 61, 48, 67, 73, 58, 50, 64, 79, 46 and 60. Write the statement for a histogram with the intervals 40 to 50, 50 to 60, 60 to 70 and 70 to 80, and state the height of each bar.
    Answer plt.hist(marks, bins=[40, 50, 60, 70, 80], edgecolor="black") gives heights 3, 3, 4 and 2. A value on a boundary, such as 50 or 60, goes to the interval that begins there. One mark for the statement, two for the heights. Check that they add to 12.

More drawing practice: Matplotlib charts for Class 12 IP.

Four marks: the whole program

  1. [4] Write a program for a bar graph of the honey from four hives: H1 14, H2 9, H3 17, H4 11. Give it the title "Honey Collected in October", labels on both axes, bars in one colour and a legend.
    Answer
    Q23bar graph
    import matplotlib.pyplot as plt
    hives = ["H1", "H2", "H3", "H4"]
    kg = [14, 9, 17, 11]
    plt.bar(hives, kg, width=0.5,
            color="goldenrod", label="Honey in kg")
    plt.title("Honey Collected in October")
    plt.xlabel("Hive")
    plt.ylabel("Kilograms")
    plt.legend()
    plt.show()
    Bar graph titled Honey Collected in October with bars of 14, 9, 17 and 11 kilograms for hives H1 to H4
    A fair split, in the manner of the official scheme for its chart question: import 1, the bar call with its label 1, and half each for title, axis labels, legend and show.
  2. [4] A reading room had 31, 28, 34, 40 and 38 visitors a day in the mornings of five weeks, and 22, 27, 30, 29 and 36 in the evenings. Draw both on one line plot with markers, a title, axis labels and a legend.
    Answer
    Q24two lines on one plot
    import matplotlib.pyplot as plt
    week = [1, 2, 3, 4, 5]
    morning = [31, 28, 34, 40, 38]
    evening = [22, 27, 30, 29, 36]
    plt.plot(week, morning, marker="o", label="Morning")
    plt.plot(week, evening, marker="s", label="Evening")
    plt.title("Visitors to the Reading Room")
    plt.xlabel("Week")
    plt.ylabel("Visitors a day")
    plt.xticks(week)
    plt.ylim(15, 45)
    plt.legend()
    plt.show()
    Line plot of morning and evening visitors to a reading room over five weeks, the morning line above the evening line throughout
    Two calls to plot() before one show() put both lines on the same axes. xticks() and ylim() tidy the picture and are not needed for the marks.

4. Unit 2

Class 12 IP MySQL important questions

Every query below uses one of two small tables, so you can check a result by eye. The answers ran on MySQL (major version 26) and the grids are printed as it gave them.

Table PLAY

PIDTitleLangMinutesStagedTicket
P1Andhera KuanHindi952026-09-12250
P2The LampEnglish702026-10-03300
P3NadiBengali1202026-09-27200
P4Paper BoatsEnglish852026-11-08NULL
P5MittiHindi1102026-10-18180

Table BOOKED

BNoPIDBuyerSeats
1P1Irfan4
2P3Leela2
3P1Joshua3
4P5Leela5
5P2Irfan1
6P3Nima6

One and two marks

  1. [1] The Ticket column of PLAY is NULL in one of its five rows. What do COUNT(*) and COUNT(Ticket) return?
    Answer 5 and 4. Counting a column skips NULL; the star counts rows.
  2. [1] What does SELECT ROUND(286.47, -1); return?
    Answer 290. A second value of -1 rounds to the nearest ten.
  3. [1] Write the SQL command that removes the column Ticket from the table PLAY.
    Answer ALTER TABLE PLAY DROP Ticket; DELETE would be wrong, because it removes rows.
  4. [1] Which function gives the name of the weekday for a date, such as Saturday?
    Answer DAYNAME(). DAY() gives the day of the month as a number.
  5. [2] Give two differences between WHERE and HAVING.
    Answer WHERE filters rows before they are grouped, HAVING filters groups after. WHERE cannot contain an aggregate function; HAVING can, as in HAVING COUNT(*) > 1.
  6. [2] How is a single-row function different from an aggregate function? Give one example of each.
    Answer A single-row function works on each row and returns one value per row, for example UPPER(Title). An aggregate function works on many rows together and returns one value for the set or for each group, for example MAX(Minutes).
  7. [2] In PLAY both PID and Title have no repeated values. What are they called together, and what is Title called once PID is made the primary key?
    Answer Both are candidate keys. PID becomes the primary key, so Title is the alternate key. One mark each.
  8. [2] State what is left after each: DELETE FROM PLAY; and DROP TABLE PLAY;
    Answer After DELETE the rows are gone and the empty table with its columns remains. After DROP neither rows nor table remain, and the next query on PLAY is an error.
  9. [2] Write the value of each: SELECT MOD(29, 6) + POWER(2, 3); and SELECT LENGTH(TRIM('  tea leaf '));
    Answer 13, since the remainder is 5 and 2 to the power 3 is 8. 8, since TRIM clears both ends and the space in the middle still counts.

If joins and grouping are the trouble, there are more on IP SQL questions with answers.

Three marks

  1. [3] Write queries on PLAY to display (i) each title in capitals, with the first two letters of its language, (ii) the title and the position of the letter a in it, (iii) titles longer than 5 characters.
    Answer
    Q34text functions
    SELECT UPPER(Title), LEFT(Lang, 2) FROM PLAY;
    SELECT Title, INSTR(Title, 'a') FROM PLAY;
    SELECT Title FROM PLAY WHERE LENGTH(Title) > 5;
    As MySQL printed themMySQL 26
    +--------------+---------------+
    | UPPER(Title) | LEFT(Lang, 2) |
    +--------------+---------------+
    | ANDHERA KUAN | Hi            |
    | THE LAMP     | En            |
    | NADI         | Be            |
    | PAPER BOATS  | En            |
    | MITTI        | Hi            |
    +--------------+---------------+
    
    +--------------+-------------------+
    | Title        | INSTR(Title, 'a') |
    +--------------+-------------------+
    | Andhera Kuan |                 1 |
    | The Lamp     |                 6 |
    | Nadi         |                 2 |
    | Paper Boats  |                 2 |
    | Mitti        |                 0 |
    +--------------+-------------------+
    
    +--------------+
    | Title        |
    +--------------+
    | Andhera Kuan |
    | The Lamp     |
    | Paper Boats  |
    +--------------+
    INSTR ignores case here, so Andhera Kuan gives 1. Mitti has no a at all, so the function returns 0.
  2. [3] Write queries on PLAY to display (i) the title and the weekday of staging, (ii) plays staged in October, (iii) titles with the latest staging first.
    Answer
    Q35date functions
    SELECT Title, DAYNAME(Staged) FROM PLAY;
    SELECT Title, Staged FROM PLAY WHERE MONTH(Staged) = 10;
    SELECT Title, Staged FROM PLAY ORDER BY Staged DESC;
    As MySQL printed themMySQL 26
    +--------------+-----------------+
    | Title        | DAYNAME(Staged) |
    +--------------+-----------------+
    | Andhera Kuan | Saturday        |
    | The Lamp     | Saturday        |
    | Nadi         | Sunday          |
    | Paper Boats  | Sunday          |
    | Mitti        | Sunday          |
    +--------------+-----------------+
    
    +----------+------------+
    | Title    | Staged     |
    +----------+------------+
    | The Lamp | 2026-10-03 |
    | Mitti    | 2026-10-18 |
    +----------+------------+
    
    +--------------+------------+
    | Title        | Staged     |
    +--------------+------------+
    | Paper Boats  | 2026-11-08 |
    | Mitti        | 2026-10-18 |
    | The Lamp     | 2026-10-03 |
    | Nadi         | 2026-09-27 |
    | Andhera Kuan | 2026-09-12 |
    +--------------+------------+
    MONTHNAME(Staged) = 'October' is equally good in (ii).
  3. [3] Write the output on PLAY.
    Q36predict
    SELECT LEFT(Title, 3), LENGTH(Title) FROM PLAY
    WHERE Lang = 'English';
    
    SELECT MONTH(Staged), COUNT(*) FROM PLAY
    GROUP BY MONTH(Staged) ORDER BY MONTH(Staged);
    
    SELECT MOD(Minutes, 60) FROM PLAY WHERE PID = 'P3';
    Answer
    OutputMySQL 26
    +----------------+---------------+
    | LEFT(Title, 3) | LENGTH(Title) |
    +----------------+---------------+
    | The            |             8 |
    | Pap            |            11 |
    +----------------+---------------+
    
    +---------------+----------+
    | MONTH(Staged) | COUNT(*) |
    +---------------+----------+
    |             9 |        2 |
    |            10 |        2 |
    |            11 |        1 |
    +---------------+----------+
    
    +------------------+
    | MOD(Minutes, 60) |
    +------------------+
    |                0 |
    +------------------+
    The space in The Lamp is counted, so its length is 8.
  4. [3] Write queries to display (i) the number of plays and the average length for each language, (ii) the same only for languages with more than one play, (iii) the highest and lowest ticket.
    Answer
    Q37grouping
    SELECT Lang, COUNT(*), AVG(Minutes) FROM PLAY GROUP BY Lang;
    
    SELECT Lang, COUNT(*), AVG(Minutes) FROM PLAY
    GROUP BY Lang HAVING COUNT(*) > 1;
    
    SELECT MAX(Ticket), MIN(Ticket) FROM PLAY;
    As MySQL printed themMySQL 26
    +---------+----------+--------------+
    | Lang    | COUNT(*) | AVG(Minutes) |
    +---------+----------+--------------+
    | Hindi   |        2 |     102.5000 |
    | English |        2 |      77.5000 |
    | Bengali |        1 |     120.0000 |
    +---------+----------+--------------+
    
    +---------+----------+--------------+
    | Lang    | COUNT(*) | AVG(Minutes) |
    +---------+----------+--------------+
    | Hindi   |        2 |     102.5000 |
    | English |        2 |      77.5000 |
    +---------+----------+--------------+
    
    +-------------+-------------+
    | MAX(Ticket) | MIN(Ticket) |
    +-------------+-------------+
    |         300 |         180 |
    +-------------+-------------+

Four marks: two tables

  1. [4] Using both tables, write queries to display (i) the buyer, the title and the seats of every booking, (ii) the title and the total seats booked, only for plays with more than 4 seats in all. (2 + 2)
    Answer
    Q38equi-join
    SELECT Buyer, Title, Seats FROM PLAY, BOOKED
    WHERE PLAY.PID = BOOKED.PID;
    
    SELECT Title, SUM(Seats) FROM PLAY, BOOKED
    WHERE PLAY.PID = BOOKED.PID
    GROUP BY Title HAVING SUM(Seats) > 4;
    As MySQL printed themrow order may differ
    +--------+--------------+-------+
    | Buyer  | Title        | Seats |
    +--------+--------------+-------+
    | Irfan  | Andhera Kuan |     4 |
    | Leela  | Nadi         |     2 |
    | Joshua | Andhera Kuan |     3 |
    | Leela  | Mitti        |     5 |
    | Irfan  | The Lamp     |     1 |
    | Nima   | Nadi         |     6 |
    +--------+--------------+-------+
    
    +--------------+------------+
    | Title        | SUM(Seats) |
    +--------------+------------+
    | Andhera Kuan |          7 |
    | Nadi         |          8 |
    | Mitti        |          5 |
    +--------------+------------+
    One mark for the two tables with the columns and one for the join condition, in each part.
  2. [4] Write the output on PLAY and BOOKED. (2 + 2)
    Q39predict
    SELECT PID, SUM(Seats), COUNT(*) FROM BOOKED
    GROUP BY PID HAVING COUNT(*) = 2 ORDER BY PID;
    
    SELECT Buyer, Title, Ticket * Seats FROM PLAY, BOOKED
    WHERE PLAY.PID = BOOKED.PID AND Lang = 'Hindi'
    ORDER BY BNo;
    Answer
    OutputMySQL 26
    +------+------------+----------+
    | PID  | SUM(Seats) | COUNT(*) |
    +------+------------+----------+
    | P1   |          7 |        2 |
    | P3   |          8 |        2 |
    +------+------------+----------+
    
    +--------+--------------+----------------+
    | Buyer  | Title        | Ticket * Seats |
    +--------+--------------+----------------+
    | Irfan  | Andhera Kuan |           1000 |
    | Joshua | Andhera Kuan |            750 |
    | Leela  | Mitti        |            900 |
    +--------+--------------+----------------+
    Write the heading row of each result as well as the values.
  3. [4] Each query is meant to do what its comment says, and each is wrong. Correct them.
    Q40four faults
    -- plays with no ticket price entered
    SELECT Title FROM PLAY WHERE Ticket = NULL;
    
    -- languages whose plays are longer than 90 on average
    SELECT Lang FROM PLAY WHERE AVG(Minutes) > 90 GROUP BY Lang;
    
    -- Hindi plays in the order of staging
    SELECT Title FROM PLAY ORDER BY Staged WHERE Lang = 'Hindi';
    
    -- who booked which play
    SELECT Buyer, Title FROM PLAY, BOOKED;
    Answer
    Q40 correctedone mark each
    SELECT Title FROM PLAY WHERE Ticket IS NULL;
    
    SELECT Lang FROM PLAY GROUP BY Lang HAVING AVG(Minutes) > 90;
    
    SELECT Title FROM PLAY WHERE Lang = 'Hindi' ORDER BY Staged;
    
    SELECT Buyer, Title FROM PLAY, BOOKED
    WHERE PLAY.PID = BOOKED.PID;
    The first wrong query runs and finds nothing, and the last one runs and gives 30 rows (5 times 6). The other two stop with an error. A query that runs is not always a query that is right.

Five marks

  1. [5] Write queries on PLAY to display (i) the title and the length in hours rounded to one decimal place, (ii) the titles ending in the letter i, (iii) the title without any spaces typed before it, (iv) the total minutes of all plays, (v) the title and the year of staging.
    Answer
    Q41one mark each
    SELECT Title, ROUND(Minutes / 60, 1) FROM PLAY;
    SELECT Title FROM PLAY WHERE RIGHT(Title, 1) = 'i';
    SELECT LTRIM(Title) FROM PLAY;
    SELECT SUM(Minutes) FROM PLAY;
    SELECT Title, YEAR(Staged) FROM PLAY;
    On this data (i) gives 1.6, 1.2, 2.0, 1.4 and 1.8, (ii) gives Nadi and Mitti, and (iv) gives 480.
  2. [5] Write commands to (i) create the table VOLUNTEER with VID (integer, primary key), VName (up to 20 characters), Duty (up to 15) and Hours (integer), (ii) insert 1, Farah, Lights, 6 and 2, Gopal, Tickets, 4, (iii) add a column Phone of 10 characters, (iv) raise by 2 the hours of everyone on Tickets, (v) remove volunteers with more than 5 hours. What is left?
    Answer
    Q42DDL and DML
    CREATE TABLE VOLUNTEER (VID INT PRIMARY KEY, VName VARCHAR(20),
                            Duty VARCHAR(15), Hours INT);
    INSERT INTO VOLUNTEER VALUES (1, 'Farah', 'Lights', 6);
    INSERT INTO VOLUNTEER VALUES (2, 'Gopal', 'Tickets', 4);
    ALTER TABLE VOLUNTEER ADD Phone CHAR(10);
    UPDATE VOLUNTEER SET Hours = Hours + 2 WHERE Duty = 'Tickets';
    DELETE FROM VOLUNTEER WHERE Hours > 5;
    Nothing is left. Gopal goes from 4 to 6 in (iv), so (v) removes both rows. The table itself remains, empty. MySQL returned an empty set for SELECT * after these six commands.

5. Units 3 and 4

Informatics Practices important questions: networks and societal impacts

Twenty marks of the paper need no code at all. They go to answers that use the right word and then stop: name the thing, give the reason, move on.

Computer networks

  1. [1] Which device makes a weak signal strong again on a long cable?
    Answer A repeater.
  2. [1] In the address https://library.example/new/books.html, which part names the page?
    Answer books.html. https is the protocol, library.example the domain name and new a folder.
  3. [2] How does a switch handle data differently from a hub?
    Answer A hub sends whatever arrives to every port. A switch sends it only to the computer it is meant for, so there is less traffic on the cable. One mark for each device.
  4. [2] Give one advantage and one disadvantage of mesh topology.
    Answer Advantage: if one link fails, data can take another path. Disadvantage: it needs many cables and ports, so it costs more and is harder to set up.
  5. [2] How is a website different from a web page?
    Answer A web page is one document opened in a browser. A website is a collection of linked pages under one domain, kept on a web server.
  6. [2] Name two browser settings you would check after using a computer in a cyber cafe, and say why.
    Answer Saved passwords: remove them so that nobody signs in as you. History and cookies: clear them, because they show the sites you visited and may keep you signed in.
  7. [2] What is the difference between a web server and web hosting?
    Answer A web server is the computer, with its software, that stores pages and sends them when a browser asks. Web hosting is the service of keeping a website on such a server so that others can reach it.
  8. [5] The Rangoli handloom society in Bhuj is joining four buildings.
    FromToDistance
    WeavingDyeing40 m
    WeavingDesign75 m
    WeavingOffice140 m
    DyeingDesign60 m
    DyeingOffice125 m
    DesignOffice115 m
    BuildingComputers
    Weaving45
    Dyeing12
    Design90
    Office30
    (i) Which building should have the server, and why? (ii) Suggest a cable layout that uses the least cable. (iii) Where is a repeater needed in your layout? (iv) The 90 computers of Design all connect to one central device. Name the topology and the device. (v) The society's site has five pages that are the same for every visitor and change once a year. Static or dynamic?
    Answer (i) Design, which has the most computers, so most of the traffic stays inside it.
    (ii) Weaving to Dyeing, Dyeing to Design, Design to Office.
    Layout, 215 m in all40 + 60 + 115
    Weaving --40m-- Dyeing --60m-- Design --115m-- Office
    (iii) Between Design and Office, since 115 m is more than about 100 m.
    (iv) Star, with a switch.
    (v) Static, since the content does not change from visitor to visitor. One mark for each part.

Notes for the unit: computer networks for Class 12 IP.

Societal impacts

  1. [1] Mihir installs a paid photo editor with a key he found online. Which rule does he break?
    Answer The software licence, the terms under which the owner lets people use it. Using it without one is also copyright infringement.
  2. [1] Which right protects the words and pictures of a comic book from being copied?
    Answer Copyright.
  3. [2] Suggest two ways to keep your digital footprint small.
    Answer Share less: keep accounts private and think before posting. Give apps fewer permissions: turn off location and camera access where they are not needed. One mark for each with a reason.
  4. [2] How can a student use a paragraph from a website without plagiarism?
    Answer Put a direct copy in quotation marks and name the source beside it. Or write the idea in your own words, and still name the source.
  5. [2] Give two differences between free and open source software and proprietary software.
    Answer In FOSS the source code is available and may be changed and shared; in proprietary software it is kept by the owner. FOSS may be copied under its licence; copying proprietary software without permission is not allowed.
  6. [2] Why should an old battery or circuit board not go into the household bin? Give two reasons.
    Answer Lead, cadmium and mercury in them can leach into soil and water and harm people who use that water. Burning or breaking them in the open gives off poisonous fumes that harm the workers and the neighbourhood.
  7. [3] Read and answer. (i) Someone reads Anu's school e-mail after trying hundreds of passwords. Which cybercrime is it? (ii) A message that looks as if it came from her bank asks her to sign in through a link. Which cybercrime is it? (iii) Suggest one step that would have protected her account in (i).
    Answer (i) Hacking, entry without permission. (ii) Phishing. (iii) A long password used nowhere else, with a second step such as an OTP. One mark each.
  8. [3] What is the Indian IT Act? Mention two kinds of wrong it deals with.
    Answer The Information Technology Act, 2000 is the law that gives legal recognition to electronic records and digital signatures and sets punishments for cyber offences. It deals, for example, with getting into a computer without permission and with stealing or misusing somebody's data or password. One mark for the definition, one for each kind.

Notes for the unit: societal impacts.

How a teacher uses this bank. You bring the numbers you got wrong. We run what you actually wrote, so a missing comma shows itself, and then the data is changed: a new label, a NULL, a fourth table row. If the second answer is right too, that number is crossed off.

One to one, at your own timing

Bring the numbers you could not solve

Teaching is personalised one to one, on days and at a time that you name. You can try it through a priority demo, a full live class at the slot you choose with a written skill report afterwards; enrol, and its fee comes off the first month. The free demo class is there as well. You pay month by month, there is no admission fee, and you may stop when any month ends.

Before you enrol · Try a class

Priority demo, at a slot you pick

a full live class of about 45 to 60 minutes

  • One pandas, one SQL and one theory question, written while the teacher watches
  • Your code is run unedited and the error read together
  • A second version of the hardest one, on the spot
  • A written skill report that names the unit to start with
Book a priority demo

The classes · Choose your own timing

Personalised one to one

₹4,999

per month, 4 private classes, fully flexible timing

  • Outputs on paper first, pandas afterwards
  • Queries checked on real MySQL tables
  • Two-mark theory answers cut to length
  • New questions on the same point until it holds
Ask for a personalised plan

Some students need five pandas lessons and no SQL, and some the reverse, so there is no set order. The monthly fee on this page appears in the currency of your country.

Studying outside India?

IP question practice from Muscat to Singapore

CBSE schools abroad sit the same 065 paper on the same morning. Choose a class hour after your own school day, and we keep to your clock.

Where you liveTime differenceUsual class window, local timeFormat
India
every Indian city
Indian timeAny time you choosePersonalised 1-on-1
UAE and Oman
Dubai, Abu Dhabi, Sharjah, Muscat
1 h 30 min behind India3:00 PM to 9:00 PMPersonalised 1-on-1
Saudi Arabia, Qatar, Kuwait, Bahrain
Riyadh, Jeddah, Dammam, Doha, Kuwait City, Manama
2 h 30 min behind India3:00 PM to 9:00 PMPersonalised 1-on-1
Nepal
Kathmandu
15 min ahead of India4:30 PM to 9:00 PMPersonalised 1-on-1
Ethiopia and East Africa
Addis Ababa and East Africa Time
2 h 30 min behind India4:30 PM to 9:00 PMPersonalised 1-on-1
Singapore and Malaysia
Singapore, Kuala Lumpur
2 h 30 min ahead of India3:30 PM to 9:00 PMPersonalised 1-on-1

A laptop with Python and pandas is enough for the first 24 questions. MySQL can be installed later, with help in class.

What families say

Rated 4.9 across 547 Google reviews

Real reviews from real families. We neither write nor commission them.

★★★★★

"The one step solution for my son. Modern Age Coders make learning coding so simple that kids love it. The teachers explain complex concepts clearly with practical exercises and interactive content."

Ria Mukherjee

Parent

★★★★★

"Modern Age Coders has been a game-changer for me. I struggled to grasp IT concepts and coding before joining, but their classes transformed everything. I can now confidently write complex programs with ease."

Samriddha Mondal

Student

★★★★★

"One of the most wonderful education centres out there. Education is not limited to school syllabus but focuses on skill development."

Vansh Agarwal

Student

★★★★★

"My child Dhairya is really enjoying the Modern Age Coders classes. This is his first online class and he eagerly looks forward to it. I can already see his improvement, and the teachers are very cooperative."

Sonam Oswal

Parent of Dhairya

★★★★★

"Modern Age Coders have wonderful teachers who teach in a clear, easy and practical way. The teacher boosts students' confidence and inspires them to learn without hesitation."

Sonu Goyal

Parent

★★★★★

"I highly recommend this computer coding class! The teachers are incredibly knowledgeable and passionate about coding."

Ritu Kedia

Parent

The rest of the Class 12 series

More pages for Class 12 students

Every page in the CBSE Class 12 Informatics Practices series, grouped by what you need.

Questions about this IP bank

What students ask about Class 12 IP important questions

What are the most important questions for Class 12 IP?

Nobody outside the board can name them. The safe list comes from the syllabus: Series and DataFrame outputs, adding, renaming and deleting in a DataFrame, Boolean indexing, one program for each plot, SQL text, date and aggregate functions, GROUP BY with HAVING, an equi-join, a network case, and short answers on cyber safety and intellectual property.

Where can I get Class 12 IP important questions as a PDF?

We do not give a PDF. All 58 questions and answers are open on this page without a login, and you can print it from your browser. Practise with the answers closed, because the exam asks you to write code and queries from memory.

How many marks does pandas carry in Class 12 IP?

Data Handling using Pandas and Data Visualization is 25 of the 70 theory marks in the 2026-27 syllabus. CBSE does not split those 25 between pandas and Matplotlib. SQL carries another 25, networks 10 and societal impacts 10.

Which MySQL topics are important for Class 12 IP?

The functions the syllabus lists: POWER, ROUND and MOD; the text functions from UPPER to TRIM; NOW, DATE, MONTH, MONTHNAME, YEAR, DAY and DAYNAME; and MAX, MIN, AVG, SUM and COUNT. Add GROUP BY, HAVING, ORDER BY, the Class 11 commands and an equi-join of two tables.

Are these Informatics Practices questions from previous years?

No. They are original, written for the 2026-27 syllabus. Question papers of earlier years are on the CBSE website and are worth solving. Skip anything in them that the present syllabus does not name.

Are pivot tables and groupby important for Class 12 IP?

They are not named in the Unit 1 theory list for 2026-27, so this bank has none. One item of the suggested practical list does ask you to group rows by category and total them, so know how to do that on the computer.

How do I score full marks in output questions?

Copy the form of the output as well as the values. For a Series write the label column, the value column and the dtype line. Use NaN where labels do not match, and remember that NaN turns whole numbers into decimals. For SQL write the headings above the rows.

Should I write import pandas as pd in every answer?

Write it whenever the question says program. When it asks only for statements on a DataFrame that already exists, the statements are enough. Writing the import costs a few seconds and never loses a mark.

How should I revise IP in the last week?

Give two days to pandas, one to charts, two to SQL and one to networks and society, and write a paper on the last day. Each day, answer ten questions from one unit on paper and correct them against a run. The IP exam is on Wednesday 31 March 2027.

Can I get one to one help with Class 12 IP questions?

Yes. Modern Age Coders teaches Informatics Practices live, one student at a time, at your own days and timing. A priority demo, a full class of about 45 to 60 minutes with a written skill report, shows how it works, and a free demo class is available too.

Start

Three numbers are enough to begin

Send us the three question numbers that beat you. In a priority demo the teacher works through them with you at a slot you choose, gives you changed versions, and writes a skill report after the class. The fee is adjusted against your first month if you enrol.

The free demo class takes one of the three. If objective questions are your worry, try the Class 12 IP MCQ test first.

WhatsApp us · +91 91233 66161 · connect@modernagecoders.com

Every class is live video. The form requests a callback and reserves nothing.

We call within a few hours. No card, no enrolment fee.

Want it sooner? Book a priority demo

A full live class of about 45 to 60 minutes at a slot you pick, with a written skill report and learning roadmap on WhatsApp afterwards. The fee is adjusted against your first month if you enrol.

Book a priority demo

Keep exploring Modern Age Coders

By class and age

Learn more

Free resources

From the blog

Start here