/**/ Python & MySQL: PRACTICAL QUESTIONS FOR CLASS XII (2020-21) (SET -2)

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 !!!




No comments:

Post a Comment

Please do not any spam in the comment box.

CLASS XI HALF YEARLY QP WTH MS 2024

  Half Yearly Examination: 2024-25 Informatics Practices (065) Class- XI       Time Allowed: 3hrs                                     ...