/**/ Sanjeev Study Hub – Class 11 & 12 Notes, Question Papers, IP & CS Study Material

Tuesday, February 23, 2021

PRACTICAL QUESTIONS FOR CLASS XII (2020-21) (SET -2)

 SUBJECT – INFORMATICS PRACTICES

MM – 30                                            TIME – 3 HOURS

SET-2

Q.1 Write a python program to generate a bar chart for the following information


Country

Population

India

130

China

140

USA

33

Indonesia

22

Bangladesh

16


  1. The bar Chart should have different Colours for each Country
  2. There Should be proper labels for X and Y axis
  3. The Title of the chart should be ‘World Population’
  4. Draw the Chart generated in your PC in the Answer Paper


Q.2  Consider the table PROJECTWORK given below. Write commands in SQL for (i) to (iv).

Table: PROJECTWORK

ID

ProjectName

Size

StartDate

EndDate

Price

P1

Payroll-M

Medium

2010-03-17

2010-09-16

60000

P2

Payroll-I

Large

2012-02-12

2013-01-11

50000

P3

Mgmt-L

Large

2012-06-13

2013-05-21

30000

P4

Recruit-L

Medium

2012-03-18

2012-06-01

50000

P5

Mgmt-M

Small

2009-01-15

2009-01-20

20000

P6

Recruit-I

Medium

2012-03-01

2012-06-28

50000

Questions:

  1. To display all information about projects of medium size.
  2. To list the size of projects whose ProjectName ends with L.
  3. To list ID, ProjectName, Size and Price of all the projects in descending orders of StartDate.
  4. To count the number of projects of price less than 100000.


SOLUTION:

(I)

import matplotlib.pyplot as plt

country = ['India', 'China', 'USA', 'Indonesia', 'Bangladesh']

population = [130, 140, 33, 22, 16]

plt.bar(country, population, color=['red', 'black', 'green', 'blue', 'yellow'])

plt.xlabel("Country")

plt.ylabel("Population")

plt.title("World Population")

plt.show()

(II)

  1. SELECT * FROM PROJECTWORK WHWER SIZE = “Medium”;
  2. SELECT * FROM PROJECT WORK WHERE PROJECTNAME LIKE “L”;
  3. SELECT ID, PROJECTNAME, SIZE, PRICE FROM PROJECTWORK ORDER BY STARTDATE DESC;
  4. SELECT COUNT(*) FRP, PROJECTWORK WHERE PRICE<100000;


I will provide the many sets of practical question papers. I hope everyone follow my blog.


Thank You !!!




PRACTICAL QUESTIONS FOR CLASS XII (2020-21)

 SUBJECT – INFORMATICS PRACTICES

MM – 30                                           TIME – 3 HOURS

                                                        SET-1

Q.1

Salesman

SNo

SName

Sale1

Sale2

101

George

15

20

102

Sulivan

17

18

103

Teresa

14

19

104

Peter

12

13


Write a program in Python Pandas to create the following DataFrame salesman from a Dictionary:

  • Create and display the DataFrame
  • Display the average score of Sale1 column.
  • Show the sales of sulivan only.


Q.2

Consider the following table named “GYM” with details about fitness items being sold in the store. Write command of SQL for (i) to (iv).

Table : GYM

ICODE

INAME

PRICE

BRADNAME

G101

Power Fit Exerciser

20000

Power Gymea

G102

Aquafit Hand Grip

1800

Reliable

G103

Cycle Bike

14000

Ecobike

G104

ProtonerExexteme Gym

30000

Coscore

G105

Message Belt

5000

Message Expert

G106

Cross Trainer

13000

GTC Fitness


Questions:

  1. To display the name of all the items whose name starts with “A”.
  2. To display ICODes and INAMEs of all items, whose Brandname is Reliable or Coscore.
  3. To change the Brandname to “Fit Trend India” of the item, whose ICODE is “G101”.
  4. To add a new row for new item in GYM with the details:

“G107”,  “Vibro exerciser”,  21000,  “GTCFitness”

SOLUTION

(I)

Import pandas as pd

df = {‘SNo’ : [102, 102, 103,104],

‘SName’: [‘George’, ‘Sulivan’, ‘Teresa’, ‘Peter’],

‘Sale1’ :[ 15, 17, 14, 12],

‘Sale2’: [20, 18, 19, 13]}

Salesman=pd.DataFrame(df)

(i) print(salesman)

(ii) salesman.Sale1.mean()             or      salesman[‘Sale1’].mean()

(iii)salesman[salesman[‘SName’]==’Sulivan’]

or

salesman[salesman[‘SName’]==’Sulivan’]

(II)

  1. SELECT INAME FROM GYM WHERE INAME LIKE “A%”;
  2. SELECT ICODE, INAME FROM GYM WHERE BRANDNAME = “RELIABLE” AND “COSCORE”;
  3. UPDATE GYM SET BRANDNAME = “FIT TREND INDIA” WHERE ICODE = “G101”;
  4. INSERT INTO GYM VALUES(“G107”, “VIBRO EXERCISER”, 21000, “GTCFITNESS”;


I will provide many sets of practical sample papers for class XII (IP)

Continue to visit the blog.


Thank You !!!








Class 12 Informatics Practices 2026 Question Paper with Answers (Full Solution)

  CBSE Class 12 IP 2026 बोर्ड पेपर + Solutions 1. State whether the following statement is True or False: In Pandas Series, the Positional...