Lab Test
Lab Test
(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
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
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
Aditya 85 95 80 70 330
Muskan 88 99 99 99 385
Tamanna 99 88 99 98 384
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
Practical File 5
Project Work 5
Viva-Voce 5
AISSCE PRACTICAL EXAMINATION (2023-2024)
SCHOOL CODE: 55577
CODE & SUB: (065) INFORMATICS PRACTICES – LAB TEST
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
• 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
• 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