[go: up one dir, main page]

0% found this document useful (0 votes)
26 views8 pages

Maths Pyq Class11

The document is a mid-term examination paper for Class XII Informatics Practices for the academic year 2023-24, consisting of 35 questions divided into five sections with varying marks. It includes questions on Python programming, SQL queries, and data analysis concepts. The exam has a total duration of 3 hours and a maximum score of 70 marks.

Uploaded by

8caafiya9149
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views8 pages

Maths Pyq Class11

The document is a mid-term examination paper for Class XII Informatics Practices for the academic year 2023-24, consisting of 35 questions divided into five sections with varying marks. It includes questions on Python programming, SQL queries, and data analysis concepts. The exam has a total duration of 3 hours and a maximum score of 70 marks.

Uploaded by

8caafiya9149
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

MID TERM EXAMINATION (2023-24)

CLASS XII
INFORMATICS PRACTICES
SET-2
Time: 3 Hours Max. Marks: 70
General Instructions:
 Please check this question paper contains 35 questions.
 The paper is divided into 4 Sections- A, B, C, D and E.
 Section A, consists of 18 questions. Each question carries 1 Mark.
 Section B, consists of 7 questions. Each question carries 2 Marks.
 Section C, consists of 5 questions. Each question carries 3 Marks.
 Section D, consists of 2 questions. Each question carries 4 Marks.
 Section E, consists of 3 questions. Each question carries 5 Marks.
 All programming questions are to be answered using Python
Language only.

SECTION A
1 What is the purpose of legend in plot? 1
2 CSV stands for ______ 1
3 In a dataframe axis-0 is for: 1
a. Columns
b. Rows
c. Rows and columns both
d. None of these
4 Which one out of the following provides a visual interpretation 1
of numerical data by showing the number of data points that
fall within a specified range of values.
a. Pie chart
b. Bar chart
c. Histogram
d. All of the above
5 PANDAS stands for _____________ 1

1
6 Which of the following methods should be employed in the 1
code to display a plot()?
a. show()
b. display()
c. execute()
d. plot()
7 Predict the output of the given Python code: 1
import pandas as pd
list1=[-20,-30,-40]
ser = pd.Series(list1*3)
print(ser)
8 With reference to SQL, identify the invalid data type. 1
i. Date ii. Integer iii. Varchar iv. Month
9 In SQL, the equivalent of UCASE() is: 1
i. UPPERCASE () ii. CAPITALCASE()
iii. UPPER() iv. TITLE ()
10 Consider the given SQL string: “XIIBAll the Best!” 1
Write suitable SQL query to extract first five characters from
the string.
11 Missing data in pandas is represented through: 1
a. NaN
b. None
c. Null
d. Missing
12 Display first row of dataframe ‘DF’ 1
a. print(DF.head(1))
b. print(DF[0 : 1])
c. print(DF.iloc[0 : 1])
d. All of the above
13 How is loc different from iloc? 1
14 Which plot tells the trend between two graphed variables? 1
15 Predict the output of the following query: 1
SELECT LCASE (MONTHNAME ('2023-03-05'));
i. May ii. March iii. May iv. march
2
16 A CSV file is also known as a____ 1
a. Flat File
b. 3D File
c. String File
d. Random File
Q17 and 18 are ASSERTION AND REASONING based
questions. Mark the correct choice as
(a) Both A and R are true and R is the correct explanation for A
(b) Both A and R are true and R is not the correct explanation
for A
(c) A is True but R is False
(d) A is false but R is True
17 Assertion (A): pandas is an open source python library which 1
offers high performance, easy to use data structures and data
analysis tools.
Reason (R): Professionals and developers are using the pandas
library in data science and machine learning.
18 Assertion (A): In SQL, the aggregate function AVG( ) 1
calculates the average value on a set of values and produces a
single result.
Reason (R): The aggregate functions are used to perform some
fundamental arithmetic tasks such as Min() , Max(), Sum() etc.
SECTION B
19 Differentiate between Single row and Multiple row functions 2
in MySQL?
20 Write a Python code to: 2
i. create a series from list marks and taking index values
from list rollno.
rollno=[1,2,3,4,5,6] marks=[23,86,74,11,98,75]
ii. Show all elements that are above 75 marks.
21 How is WHERE different from HAVING? 2
22 Explain in brief the functions you can use to iterate over 2
dataframes.

3
23 Based on the given information, answer the following 2
questions:

i. Write Python statement to export the above DataFrame


DF to a CSV file named student.csv stored at D: drive.
ii. What will be the output of the given command?
DF.index=['045','034','067']
24 Give one similarity and one difference between NOW( ) and 2
SYSDATE( )
25 Differentiate between COUNT () and COUNT(*) functions in 2
MySQL?
SECTION C
26 Write the output of the following SQL queries: 3
i. Select instr(“INTERNATIONAL FEDERATION
ACADEMY”, “NA‟);
ii. Select length(Concat(“DATA‟,
“VISUALIZATION‟);
iii. Select round(3782.735,-2);
27 Satyam, a database analyst has created the following table 3
worker:

He has written following queries:


(a) select sum(salary) from worker where
department=’admin’ and firstname like ‘%a’;
4
(b) select min (joining_date) from worker where
salary>80000;
(c) select length(FIRST_NAME) from worker where
DEPARTMENT is NULL;
Help him in predicting the output of the above given queries.
28 Richa, a chemical analyst, needs to arrange data of few 3
elements in the form of two series containing symbols and
their atomic numbers respectively. Thereafter, the data of these
two series has to be arranged and displayed in the form of Data
Frame as shown below:
Symbol Atomic Number
Hydrogen H 1
Helium He 2
Lithium Li 3
Beryllium Be 4
Help her in writing suitable Python code to complete the task.
29 Write MySQL statements for the following: 3
i. To create a database named PCS.
ii. To create a table named “House” based on the
following specification:
Column Name Data Type Constraints
House_Name Varchar(25) Primary Key
Score Integer
Given the dataset for Employee:
30 3
Name Age Designation
Rajiv 28 Accountant
Sameer 34 Cashier
Ramesh 33 Clerk
Naveen 42 IT Manager
Mohit 32 Store Manager
Write a code in the python to do the followings:
a. Create the dataframe EMP
b. Rename the column “Designation” to “Position”
5
c. Add a new row as “VIPIN”, 40, “Salesman”

SECTION D
31 Consider the following table: 4

Write the SQL commands for the following:


i) To count number of schoolbus transporter wise.
ii) To show transporter wise average charges for all routes
having charges more than 55000.
iii) To show transporter wise total number of students
travelling.
iv) To display the Transporter who has minimum capacity.
32 Garima, a Data Analyst with a multinational brand has designed 4
the DataFrame df that contains the data as shown below:

Answer the following questions:


i. Predict the output of the following python statement:
a. print(df.size)
b. print(df[1:3])
ii. Delete the last row from the DataFrame.
iii. Write Python statement to add a new column Discount
which is 8% of Price.

6
OR
(Option for part iii only)
Write Python statement to export the DataFrame to a CSV file
named Testfile.csv stored at D: drive.

SECTION E
33 The marks of 10 students are given below: 5
marks=[80,80,60,85,70,90,85,95,80,70]
Write suitable Python code to generate a histogram based on the
given data, along with an appropriate chart title and both axis
labels. Also give suitable python statement to save this chart.

OR
Consider the following graph. Write the code to plot it.

34 Write suitable SQL queries for the following: 5


i. To calculate the exponent for 3 raised to the power of 7.
ii. To display current month name.
iii. To remove spaces from the right side of the string,
“Presentation Convent School “.
iv. To display the length of the string ‘CBSE Examination
2022-23’.

7
v. To find the remainder of two numbers, 300 and 13

OR

Alina has created following table named employee:


EmpId Name Salary
1 Ananya 60000
2 Kanish 65000
ka
3 Ishika 58000
Help her in writing SQL queries to the perform the following
task:
i. Insert a new record in the table having following values:
[4,'Khushi',85000]
ii. To change the value “Ananya” to “Annaya jain” in Name
column.
iii. To remove the records of those employees whose salary are
less than 60000.
iv. To add a new column designation of suitable datatype.
v. To display records of EmpId: 2.
35 Write a program to draw line charts for the following with 5
suitable label in the Xaxis, Y-axis and a title. Show the mortality
rate from 1940 to 2020
Year = [1940,1950,1960,1970,1980,1990,2000,2010,2020]
Unemployment_Rate = [8.8, 14, 9, 7.2, 6.9, 7, 6.5, 6.2, 5.5]

You might also like