0% found this document useful (0 votes)
9 views3 pages

Quarterly Test - I

Submit

Uploaded by

suhanililani
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)
9 views3 pages

Quarterly Test - I

Submit

Uploaded by

suhanililani
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/ 3

SHRI BALAJI ROYAL PUBLIC SCHOOL, AJMER

Quarterly Test , Session : 2024-25

Class – XII

Subject: Informatics Practices Max Marks: 30

Time Duration : 1Hr

Q.1 Predict the output of the following query: [2]


SELECT LCASE (MONTHNAME(‘2023-03-05’));
(a) May (b) March (c) may (d) march

Q.2 In Python Pandas, while performing mathematical operations on series, index matching is
implemented and all missing values are filled in with by default. [2]

(a) Null (b) Blank (c) NaN (d) Zero

Q.3 Assertion (A) To use the Pandas library in a Python program, one must import it. [2]
Reason (R) The only alias name that can be used with the Pandas library is pd.
(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

Q.4 What will be the output of the given code? [2]


import pandas as pd
s = pd.Series([1, 2, 3, 4, 5],index=*‘akram', 'brijesh', 'charu', ‘deepika', 'era'+)
print(s['charu'])

(a) 1 (b) 2 (c) 3 (d) 4

Q.5 head( ) function is used to return first ………. rows. [2]


(a) n-1 (b) n+1 (c) n2 (d) n

Q.6 What is a correct syntax to return the values of first row of a Pandas DataFrame dfRent?
[2]
(a) dfRent[0] (b) dfRent.loc[1] (c) dfRent.loc[0] (d) dfRent.iloc[1]

Q.7 Which of the following function is used to create DataFrame? [2]


(a) DataFrame() (b) NewFrame() (c) CreateDataFrame() (d) None of these

Q.8 What is a DataFrame and how is it different from a 2-D array ? [3]

Q.9 What do you understand by the size of (i) a Series, (ii) a DataFrame ? [3]
Q.10 The Python code written below has syntactical errors. Rewrite the correct code and underline
the corrections made. [3]

import Pandas as pd
data = {'A': 1, 'B'; 2. 'C': 3}
my_series = Pd.Series(data)
print(my_series)

Q.11 Write the output of following queries. [4]


(i) SELECT POWER(9, 3);
(ii) SELECT RIGHT(‘Dushyant ’, 5);
(iii) SELECT ROUND(780.22, 1);
(iv) SELECT LEFT(‘Arihant’,2);

Q.12 Do any one of part ‘a’ Or part ‘b’: [4]

a.Consider the following records in ‘Salesman’ table and answer the given questions.

Salesman

Gcode Gname Size Color Price

111 Tshirt XL Red 1400.00

112 Jeans L Blue 1600.00

113 Skirt M Black 1100.00

114 Jackets XL Blue 4000.00

115 Trousers L Brown 1500.00

116 LadiesTop L Pink 1200.00

Write the commands for the followings:


(i) Display the Gname and Price with price highest to lowest.
(ii) To change the color of Garment with code as 116 to “Orange”.
(iii) To display the all details of table Garment.
(iv) What is the degree and cardinality of ‘Garment’ table?
OR

b. Create the following DataFrame Sales containing year wise sales figures for five sales persons in INR
and answer the following:

i) Display the row labels of Sales.

ii) Display the column labels of Sales.

iii) Display the last two rows of Sales.

iv) Display the first two columns of Sales.

You might also like