0% found this document useful (0 votes)
40 views

Lab Test

The document outlines an exam for Informatics Practices containing questions on Python programming, SQL queries, and data visualization using Matplotlib. It provides sample questions and tables to use for writing code, queries and plotting graphs.

Uploaded by

sundaram
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views

Lab Test

The document outlines an exam for Informatics Practices containing questions on Python programming, SQL queries, and data visualization using Matplotlib. It provides sample questions and tables to use for writing code, queries and plotting graphs.

Uploaded by

sundaram
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

AISSCE PRACTICAL EXAMINATION (2023-2024)

SCHOOL CODE: 55577


CODE & SUB: (065) INFORMATICS PRACTICES – LAB TEST

Date:12-01-2024 Time: 3hrs


Max. Marks: 30 Batch No: 1
1. Write a program to create a Series object using a dictionary that stores the number of
students in each section of class 12 in your class. 4
2. Naman is doing some research. He has a stored line of Pascal's triangle numbers as ar2
as show below: - ar2 = [1, 7, 21, 35, 35, 21, 7, 1] 4
• He wants to plot the sine (use numpy.sin() ) , cosine (use numpy.cos()) and tangent values
(use numpy.tan() ) for the same array ar2.
• He wants cyan color for sine plot line, red color for cosine plot line, and the black color
for tangent plot line.
• Also, the tangent line should be dashed.
3. Based on the table STUDENT given here, write suitable SQL queries
for the following: 7

1. Display total number of male and female students.


2. Display gender wise minimum weight.
3. Display class wise tallest student.
4. Display name, height, weight of male students.
5. Display the students details whose name has ‘sh’.
6. Display the students whose height is above 160 and weight below 70
7. Write a query to detete the details of the student whose height is less than 55.
Practical File 5
Project Work 5
Viva-Voce 5
AISSCE PRACTICAL EXAMINATION (2023-2024)
SCHOOL CODE: 55577
CODE & SUB: (065) INFORMATICS PRACTICES – LAB TEST

Date:12-01-2024 Time: 3hrs


Max. Marks: 30 Batch No: 1
1. Write a program to create a Series object using individual vowel characters. 4
2. Write a program to plot a scatter graph taking two random distributions in X1 and Y1
(both with shape as (250,) having randomly generated integers) and plotted against each
other with varying sizes and varying colors. 4
3. Pallavi, a database administrator has designed a database for cars showroom. Help her by
writing answers to the following questions based on the given table: 7

(i) Write a query to display invoice number and name of month in which car is purchased.
(ii) Write a query to display highest price .
(iii) Write query to display all the information in descending order of sale price.
(iv) Write query to display the number of cars purchased through each payment method.
(v) Write a query to display all the information whose sale price is more than 600000.
(vi) Write a query to change the payment mode to ‘online’ where invoice no is 103.
(vii) Write a query to delete the record whose payment mode is through cheque.

Practical File 5
Project Work 5
Viva-Voce 5
AISSCE PRACTICAL EXAMINATION (2023-2024)
SCHOOL CODE: 55577
CODE & SUB: (065) INFORMATICS PRACTICES – LAB TEST

Date:12-01-2024 Time: 3hrs


Max. Marks: 30 Batch No: 1
1. Write a program to create a Series object using an ndarray that is created by tiling a list
[1,2,3]. Use np.tile() methods. 4
2. Write a program to plat a bar chart from the marks scored by you and your friends in
different subjects. 4
3. Write outputs for SQL queries (i) to (iii) which are based on the given table STUDENT:
7

i. Write a query to display the length of student name whose marks are more than400.
ii. Write a query to display the name of the student whose grade is ‘B’.
iii. Write a query to display the minimum and maximum marks of Medical students.
iv. Write a query to display the details of student whose name starts with ‘ma’.
v. Write a query to display the details of the student whose grade is ‘C’ and have
‘Commerce’ as their subject.
vi. Write a query to display the details of the student who has scored more than 400
vii. Write a query to delete the details of the student whose marks are less than 395.

Practical File 5
Project Work 5
Viva-Voce 5
AISSCE PRACTICAL EXAMINATION (2023-2024)
SCHOOL CODE: 55577
CODE & SUB: (065) INFORMATICS PRACTICES – LAB TEST
Date:12-01-2024 Time: 3hrs
Max. Marks: 30 Batch No: 1
1. Sequences section and contri1 stores the section names (‘A’, ‘B’, ‘C’, ‘D’) and contribution
made by them respectively (6700, 5600, 5000, nil) for a charity. Your school has decided
to donate as much contribution as made by each section, i.e. the donation will be doubled.
Write code to create a Series object that stores the contribution amount as the values and
the section names as the indexes with datatype as float32. 4
2. DPS 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.
Amounts collected by sections A to F are 8000, 12000, 9800, 11200, 15500, 7300
Draw a bar chart to show the collection of amounts graphically. 4
3. Consider the following sql table ‘automobile’

Write SQL queries using SQL functions to perform the following operations:
i. Display company and wheel base after rounding off to nearest ten’s decimal places.
ii. Display the position of occurrence of the string “dan” in body style.
iii. Display the year of manufacturing for sedan.
iv. Display the maximum and minimum price of automobile.
v. Write query to display all the information in descending order of date of manufacture
vi. Write a query to change the body style to hatchback who has num of cylinders as six
vii. Write a query to delete the record from automobile table whose price is less than 6000.
Practical File 5
Project Work 5
Viva-Voce 5
AISSCE PRACTICAL EXAMINATION (2023-2024)
SCHOOL CODE: 55577
CODE & SUB: (065) INFORMATICS PRACTICES – LAB TEST

Date:12-01-2024 Time: 3hrs


Max. Marks: 30 Batch No: 1
1. Write a program to create a Series object that stores the initial budget allocated (5000.00
each) for the four quarters of the year. 4
2. A survey gathers hegith and weight of 100 participants and recorded the participant's
ages:-
ages = [1, 1 , 2 , 3 , 5 , 7 , 8 , 9 , 10 , 10, 11, 13, 13, 15, 16, 17, 18, 19, 20, 21, 21, 23,
24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 27, 27, 27, 27, 27, 29, 30, 30, 30, 30, 31, 33,
34, 34, 34, 35, 36, 36, 37, 37, 37, 38, 38, 39, 40, 40, 41, 41, 42, 43, 45, 45, 46, 46,
46, 47, 48, 48, 49, 50, 51, 51, 52, 52, 53, 54, 55, 56, 57, 58, 60, 61, 63, 65, 66, 68,
70, 72, 74, 75, 77, 81, 83, 84, 87, 89, 90, 91]
Write a program to plat a histogram from above data with 20 bins. 4
3. Consider the Table CLUB given below 7

i. Write query to display the average pay for karate coach


ii. Write query to display month for date of appointment ’DATEOFAPP
iii. Write query to display the details of male coach in ascending order of their age
iv. Write query to display game wise maximum pay of all coaches.
v. Write a query to increase the pay by 5000 whose name ends with ‘A’
vi. Write a query to delete the record whose age is maximum.
vii. Write a query to display all the information in ascending order of date of app

Practical File 5
Project Work 5
Viva-Voce 5
AISSCE PRACTICAL EXAMINATION (2023-2024)
SCHOOL CODE: 55577
CODE & SUB: (065) INFORMATICS PRACTICES – LAB TEST
Date:12-01-2024 Time: 3hrs
Max. Marks: 30 Batch No: 1
1. Write Python program to Create a DataFrame with the help of dictionary, which contains
the information about Marks of Five students of five subjects.
Dictionary Contains – [Write commands to create dictionary also] 4

Name Maths Sc SSc Hindi Total

Aditya 85 95 80 70 330

Saloni 95 100 100 99 394

Muskan 88 99 99 99 385

Tamanna 99 88 99 98 384

2. Consider a DataFrame mksdf as shown below:


Name Age PreBoardMarks BoardMarks
0 Karan 17 4 25
1 Alex 19 24 94
2 Ani 18 31 57
3 Javed 18 2 62
4 Amrit 17 3 70
Write a program to plot pre-board-marks and board marks from above DataFrame on the
same line chart. 4
TABLE NAME : PHARMADB

Based on the above table “PHARMADB”, Write outputs for SQL commands from (i) to (iv) and
answer the queries from (v) to (vii):
i. SELECT SUBSTR(DrugName ,5,4) FROM PHARMADB WHERE PRICE>160;
ii. SELECT DRUGNAME FROM PHARMADB WHERE DAY(ManufactureDate)>10;
iii. SELECT ROUND ( Price, -1) FROM PHARMADB WHERE Location= ‘Delhi’;
iv. SELECT * FROM PHARMADB WHERE DRUGNAME LIKE ‘%AR%’;
v. Write a query to display all the details whose pharmacy name is ‘MYCHEMIST’
vi. Write a query to increase the price by 10.75 whose location is Mumbai
vii. Write a query to delete the record where manufacture date is less than ‘2012-01-01’

Practical File 5
Project Work 5
Viva-Voce 5
AISSCE PRACTICAL EXAMINATION (2023-2024)
SCHOOL CODE: 55577
CODE & SUB: (065) INFORMATICS PRACTICES – LAB TEST
Date:12-01-2024 Time: 3hrs
Max. Marks: 30 Batch No: 1
1. Write python code to create a data frame from a 2D dictionary, Sales which stores the
quarter-wise sales as inner dictionary for two years, as shown below :
Sales = {‘yr1’ : {‘q1’ : 34000, ‘q2’ : 56000, ‘q3’: 85000}, ‘yr2’ : {‘q1’ : 44000, ‘q2’ : 66000,
‘q3’: 55000} } 4
2. Naman is doing some research. He has a stored line of Pascal's triangle numbers as ar2
as show below: - ar2 = [1, 7, 21, 35, 35, 21, 7, 1] 4
• He wants to plot the sine (use numpy.sin() ) , cosine (use numpy.cos()) and tangent values
(use numpy.tan() ) for the same array ar2.
• He wants cyan color for sine plot line, red color for cosine plot line, and the black color
for tangent plot line.
• Also, the tangent line should be dashed.
3. Write the output of the queries (a) to (d) based on the table Table: Staff 7

a) SELECT AVG(EXP) FROM STAFF WHERE GENDER = ‘F’;


b) SELECT * FROM STAFF WHERE GENDER =’M’ AND DEPT LIKE ‘P%’;
c) SELECT UPPER(NAME) FROM STAFF WHERE YEAR(DOJ) < 2010 ;
d) SELECT * FROM STAFF GROUP BY DEPT HAVING GENDER=’M’;
Consider the below mentioned table of ‘CLOTH’

Write the SQL commands for the following:


(e) Display first three letters of all values in DESCRIPTION column e.g. ‘FRO’ for ‘FROCK’
(f) Display number of cloths of each Fabric.
(g) Display average price of cloths of each Fabric.
Practical File 5
Project Work 5
Viva-Voce 5
AISSCE PRACTICAL EXAMINATION (2023-2024)
SCHOOL CODE: 55577
CODE & SUB: (065) INFORMATICS PRACTICES – LAB TEST

Date:12-01-2024 Time: 3hrs


Max. Marks: 30 Batch No: 1
1. Write a program to create a DataFrame from a list containing dictionaries of the sales
performance of four zonal offices. Zone names should be the row labels. 4
2. Write a program to plot a scatter graph taking two random distributions in X1 and Y1
(both with shape as (250,) having randomly generated integers) and plotted against each
other with varying sizes and varying colors. 4
3. Shreya, a database administrator has designed a database for a clothing shop. Help her
by writing answers of the following questions based on the given table: Table: Cloth

i. Write a query to display total number of cloths of Green color.


ii. Write a query to display the cloth name along with Day of purchase i.e. Monday,
Tuesday
iii. Write a query to display size-wise total price of cloths.
iv. Write a query to display name of cloths which are purchased in month of November
and whose price is less than 1200.
v. Write a query to describe the table cloth
vi. SELECT SUM(PRICE) FROM CLOTH WHERE SIZE=’M’;
vii. SELECT * FROM CLOTH GROUP BY PRICE ;

Practical File 5
Project Work 5
Viva-Voce 5
AISSCE PRACTICAL EXAMINATION (2023-2024)
SCHOOL CODE: 55577
CODE & SUB: (065) INFORMATICS PRACTICES – LAB TEST

Date:12-01-2024 Time: 3hrs


Max. Marks: 30 Batch No: 1
1. Write a program to create a DataFrame to store weight, age and name of 3 people. Print
the DataFrame and its index, columns, axes, dtypes, number of rows, number of non-NaN
values in each column, and transpose of data frame. [Attributes of DataFrame] 4
2. Write a program to plat a bar chart from the marks scored by you and your friends in
different subjects. 4
3. Based on table VEHICLE given here, write suitable SQL queries for the following.
7

I. Display the average price of each type of vehicle having quantity more than 20.
II. Count the type of vehicles manufactured by each company.
III. Display the total price of each Types of vehicles.
IV. Count total number of vehicle having quantity more than 18.
V. To display the details of those vehicle number whose company name ends with ‘i’.
VI. Display the maximum and minimum price.
VII. Write a command to add a new row with values(Y36GH4,’Jeep’,’datsun’,4300000,20).

Practical File 5
Project Work 5
Viva-Voce 5
AISSCE PRACTICAL EXAMINATION (2023-2024)
SCHOOL CODE: 55577
CODE & SUB: (065) INFORMATICS PRACTICES – LAB TEST
Date:12-01-2024 Time: 3hrs
Max. Marks: 30 Batch No: 1
1. Consider the following DataFrame saleDF:-
Target Sales
zoneA 56000 58000
zoneB 70000 68000
zoneC 75000 78000
zoneD 60000 61000
Write a program to add a column namely Orders having values 6000, 6700, 6200, and
6000 respectively for the zones A, B, C and D. The program should also add a new row for
a for a new zone ZoneE. Add some dummy values in this row. 4
2. DPS 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.
Amounts collected by sections A to F are 8000, 12000, 9800, 11200, 15500, 7300
Draw a bar chart to show the collection of amounts graphically. 4
3. Write outputs for SQL queries(i) to (iii) which are based on the given table COURSE:7

I. SELECT LENGTH(CNAME) FROM FEES COURSE WHERE FEES<10000;


II. SELECT CNAME FROM COURSE WHERE MONTH (STARTDATE)==8;
III. SELECT MOD(FEES,DAY(STARTDATE)) FROM COURSE WHERE TID=104;
IV. Write a command to add a new row with values(‘C207’,’ASAS’,19900,’2018-10-15’,104)
V. Write a query to delete a record from course table whose cname ends with ‘N’.
VI. Write a query to display the average fees whose tid is 101
VII. Write a query to Display all the details whose startdate is maximum.
Practical File 5
Project Work 5
Viva-Voce 5
AISSCE PRACTICAL EXAMINATION (2023-2024)
SCHOOL CODE: 55577
CODE & SUB: (065) INFORMATICS PRACTICES – LAB TEST
Date:12-01-2024 Time: 3hrs
Max. Marks: 30 Batch No: 1
1. Create a DataFrame cityStat having following information –
Population Hospitals Schools
Delhi 10927986.0 189.0 7916.0
Mumbai 12691836.0 208.0 8508.0
Kolkata 4631392.0 149.0 7226.0
Chennai 4328063.0 157.0 7617.0
Bangalore 5678097.0 1200.0 1200.0
From the above DataFrame cityStat, create another DataFrame and it must not contain
the column ‘Population’ and the row ‘Banglore’. 4
2. Naman is doing some research. He has a stored line of Pascal's triangle numbers as ar2
as show below: - ar2 = [1, 7, 21, 35, 35, 21, 7, 1] 4
• He wants to plot the sine (use numpy.sin() ) , cosine (use numpy.cos()) and tangent values
(use numpy.tan() ) for the same array ar2.
• He wants cyan color for sine plot line, red color for cosine plot line, and the black color
for tangent plot line.
• Also, the tangent line should be dashed.
3. Based on the table STUDENT given here, write suitable SQL queries for the following: 7

1. Display total number of male and female students.


2. Display gender wise minimum weight.
3. Display class wise tallest student.
4. Display name, height, weight of male students.
5. Display the students details whose name has ‘sh’.
6. Display the students whose height is above 160 and weight below 70
7. Write a query to detete the details of the student whose height is less than 55.
Practical File 5
Project Work 5
Viva-Voce 5
AISSCE PRACTICAL EXAMINATION (2023-2024)
SCHOOL CODE: 55577
CODE & SUB: (065) INFORMATICS PRACTICES – LAB TEST

Date:12-01-2024 Time: 3hrs


Max. Marks: 30 Batch No: 1
1. Write a program to read from a CSV file employee.csv and create a dataframe from it, but
dataframe should not use file’s column header rather should use own column numbers
as 0, 1, 2, …… 4
2. Write a program to plot a scatter graph taking two random distributions in X1 and Y1
(both with shape as (250,) having randomly generated integers) and plotted against each
other with varying sizes and varying colors. 4
3. Pallavi, a database administrator has designed a database for cars showroom. Help her by
writing answers to the following questions based on the given table: 7

• Write a query to display invoice number and name of month in which car is purchased.
• Write a query to display highest price .
• Write query to display all the information in descending order of sale price.
• Write query to display the number of cars purchased through each payment method.
• Write a query to display all the information whose sale price is more than 600000.
• Write a query to change the payment mode to ‘online’ where invoice no is 103.
• Write a query to delete the record whose payment mode is through cheque.

Practical File 5
Project Work 5
Viva-Voce 5
AISSCE PRACTICAL EXAMINATION (2023-2024)
SCHOOL CODE: 55577
CODE & SUB: (065) INFORMATICS PRACTICES – LAB TEST

Date:12-01-2024 Time: 3hrs


Max. Marks: 30 Batch No: 1
1. Write a program to store the allDf DataFrame of previous example in fill alln.csv with
separator character ‘|’ 4
2. Write a program to plat a bar chart from the marks scored by you and your friends in
different subjects. 4
3. Write outputs for SQL queries (i) to (iii) which are based on the given table STUDENT:
7

• Write a query to display the length of student name whose marks are more than400.
• Write a query to display the name of the student whose grade is ‘B’.
• Write a query to display the minimum and maximum marks of Medical students.
• Write a query to display the details of student whose name starts with ‘ma’.
• Write a query to display the details of the student whose grade is ‘C’ and have
‘Commerce’ as their subject.
• Write a query to display the details of the student who has scored more than 400
• Write a query to delete the details of the student whose marks are less than 395.

Practical File 5
Project Work 5
Viva-Voce 5
AISSCE PRACTICAL EXAMINATION (2023-2024)
SCHOOL CODE: 55577
CODE & SUB: (065) INFORMATICS PRACTICES – LAB TEST
Date:12-01-2024 Time: 3hrs
Max. Marks: 30 Batch No: 1
1. The student table of test database of MySQL stores student details as RollNO, Name,
Marks, Grade.
Write a program to load only rows of this Student table where marks > 70 in a dataframe
namely mdf. 4
2. DPS 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.
Amounts collected by sections A to F are 8000, 12000, 9800, 11200, 15500, 7300
Draw a bar chart to show the collection of amounts graphically. 4
3. Consider the following sql table ‘automobile’ 7

Write SQL queries using SQL functions to perform the following operations:
• Display company and wheel base after rounding off to nearest ten’s decimal places.
• Display the position of occurrence of the string “dan” in body style.
• Display the year of manufacturing for sedan.
• Display the maximum and minimum price of automobile.
• Write query to display all the information in descending order of date of manufacture
• Write a query to change the body style to hatchback who has num of cylinders as six
• Write a query to delete the record from automobile table whose price is less than
6000.
Practical File 5
Project Work 5
Viva-Voce 5

You might also like