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

Friday, February 26, 2021

IP PRACTICAL QUESTIONS FOR CLASS XII (2020-21) (SET -3)

To get latest sample paper for class XII (IP) 2021 

PRACTICAL QUESTIONS FOR CLASS XII (2020-21)

SUBJECT – INFORMATICS PRACTICES

MM – 30                                        TIME – 3 HOURS

SET – 3

 

Q.1 Takshila Academy School celebrated volunteering week where each section of class XI dedicated a day for collecting amount for charity being supported by the school. Section A volunteered on Monday, B on Tuesday, C on Wednesday and so on. There are six sections in class XI. Amount collected by sections A to F are 9000, 13000, 8900, 12200, 14500, 6500.

(a) Create a bar chart showing collection amount.

(b) Plot the collected amount vs. days using a bar chart.


Q.2

Consider the following table FURNITURE. Write SQL commands for the statements (i) to (Viii) and write output for SQL queries (ix) and (x).

Table: FURNITURE

FCODE

NAME

PRICE

MANUFDATE

WCODE

10023

Coffee table

4000

10-Dec-2016

W03

10001

Dining table

20500

12-JAN-2017

W01

10012

Sofa

35000

06-JUNE-2016

W02

10024

Chair

2500

07-APR-2017

W03

10090

Cabinet

18000

31-MAR-2015

W02

(i) To display FCODE, NAME and PRICE of items that have Price less than Rs. 5000.

(ii) To display NAMES and PRICE of those Furniture Items that have table anywhere in their names.

(iii) To display WCode of Furniture Items. There should be no duplicate values.

(iv) To display the NAMES and PRICE increased by 500.00 of all the furniture items. (Price should only be displayed as increased; there should be no increase in the data in the table).

(v) To display FCODE and NAME of each Furniture Item in descending order of FCODE.

(vi) To display the details of all the Furniture Items which have Manufacturing date (MANUFDATE) between 01-JAN-2016 and 15-JUNE-2017 (inclusive of both the dates).

(vii) To display the average PRICE of all the Furniture Items, which are made of Wood with WCODE  as W02.

(viii) To display WCODE along with highest price of Furniture Items.

(ix) SELECT SUM(PRICE) FROM FURNITURE WHERE WCODE = ‘W03’;

(x) SELECT COUNT(DISTINCT PRICE) FROM FURNITURE;


SOLUTION:

Answer-1

(i)

import numpy as np

import matplotlib.pyplot as plt

col = [9000, 13000, 8900, 12200, 14500, 6500]

X=np.arange(6)

plt.title("Takshila Volunteering Week Collection")

plt.bar(X, col, color = 'g', width = 0.50)

plt.show()

OUTPUT


(ii)

import numpy as np

import matplotlib.pyplot as plt

col = [9000, 13000, 8900, 12200, 14500, 6500]

X=np.arange(6)

plt.title("Takshila Volunteering Week Collection")

plt.bar(X, col, color = 'Red', width = 0.50)

plt.xticks(X,['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'])

plt.xlabel("Days")

plt.ylabel("Collection")

plt.show()

OUTPUT



Answer - 2

1. SELECT FCODE, NAME, PRICE FROM FURNITURE WHERE PRICE < 5000;

2. SELECT NAME, PRICE FRON FURNITURE WHRERE NAME LIKE ‘%TABLE%’;

3. SELECT DISTINCT WCODE FROM FURNITURE;

4. SELECT NAME, PRICE+500 FROM FURNITURE;

5. SELECT FCODE, NAME FROM FURNITURE ORDER BY FCODE DESC;

6. SELECT * FROM FURNITURE WHERE MANUFDATE BETWEEN ’01-JAN-2016’ AND ’15-JUNE-2016’;

7. SELECT AVG(PRICE) FROM FURNITURE WHERE WCODE = ‘W02’;

8. SELECT WCODE, MAX(PRICE) FROM FURNITURE;

Output for SQL queries (ix) and (x)

9. 

SUM(PRICE)

6500



10.

COUNT(DISTINCT PRICE)

5

 

To get latest sample paper for class XII (IP) 2021

Continue to visit the 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                                     ...