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

Class 12 (IP) PT.1question Paper2024-25

Uploaded by

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

Class 12 (IP) PT.1question Paper2024-25

Uploaded by

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

TAKSHILA SCHOOL, AHMEDNAGAR

PT.1 EXAMINATION (2024-25)


CLASS: XII
SUBJECT: INFORMATICS PRACTICES MAX. MARKS: 40
TIME: 3 HOURS
General Instructions: -
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Sections A have 08 questions carrying 01 mark each.
4. Section B has 07 Very Short Answer type questions carrying 02 marks each.
5. Section C has 03 Short Answer type questions carrying 03 marks each.
6. Section D has 02 Long Answer type questions carrying 05 marks each.
7. Section E has 01 questions carrying 02 marks each. One internal choice is given in Q35 against part
c only.
8. All programming questions are to be answered using Python Language only.
Q.NO. QUESTION MARKS
PART A
1 To get the number of dimensions of a Series object,________ attribute is displayed. (1)
a. index b. size c. itemsize d.ndim
2 To iterate over horizontal subsets of dataframe,____ may be used. (1)
a.iterate() b. iterrows() c.itercols() d.iteritems()
3 To display third element of a Series object S, you will write __________. (1)
a. S[:3] b.S[2] c.S[3] d. S[:2]
4 To calculative cumulative sum of a column of a dataframe, you may use _________ (1)
function.
a. hasnans b.nbit c. nbyte d. dtype
5 Which of the following methods of combining two dataframes is a patching method? (1)
a.concat() b. merge() c.join() d.None of these
6 The axis 1 identifies a dataframe’s__________ (1)
a.rows b. Columns c. Values d. datatype
7 The technique to summarise given data by transferring rows to columns is (1)
called__________.
a. transfer b. transpose c. pivoting d. swapping
8 To get the number of bytes of the Series data, ______ attributes is displayed. (1)
a. hasnans b.nbit c. nbyte d. dtype
PART-B
9 How would you add a new column namely 'val' to a dataframe df that has 10 rows in it (2)
and has columns as 'Item', 'Qty', 'Price' ? You can put any values of your choice.
10 What will be the output produced by the following program? (2)
import pandas as pd
s = pd.Series(6,index=range(0,5))
print(s)
11 Write a Python program to create a series object, country using a list that stores the (2)
capital of each country.
12 What does info() and describe( ) do ? (2)
13 How is pivot_table() different from pivot() when both perform pivoting ? (2)
14 Create a DataFrame in Python from the given list: (2)
[['Divya', 'HR', 95000], ['Mamta', 'Marketing', 97000], ['Payal', 'IT', 980000], ['Deepak',
'Sales', 79000]]
Also give appropriate column headings as shown below:
Name Department Salary
0 Divya HR 95000
1 Mamta Marketing 97000
2 Payal IT 980000
3 Deepak Sales 79000
15 What will be the output of the following code? (2)
D=np.array([‘I’,’II’,’III’,’IV’,’V’])
S=pd.Series(D,index=[25,65,75,85,15])
print(s[[65,75,85])
PART-C
16 Write code statements to list the following, from a dataframe namely sales: (3)
(a) List only columns 'Item' and 'Revenue'.
(b) List rows from 3 to 7.
(c) List the value of cell in 5th row, 'Item' column.
17 Q. Consider the dataframe wdf as shown below. (3)

min Max
Temp Temp Rainfall Evaporation
0 2.9 8.0 24.3 0.0
1 3.1 14.0 26.9 3.6
2 6.2 13.7 23.4 3.6
3 5.3 13.3 15.5 39.8
4 6.3 17.6 16.1 2.8
5 5.4 18.2 16.9 0.0
6 5.5 21.1 18.2 0.2
7 4.8 18.3 17.0 0.0
8 3.6 20.8 19.5 0.0
9 7.70 19.4 22.8 16.2
10 9.90 24.1 25.2 0.0
11 11.80 28.5 27.3 0.2
12 13.20 29.1 27.9 0.0
13 16.8 24.1 30.9 0.0
14 19.40 28.1 31.2 0.0
15 21.6 34.4 32.1 0.0
16 20.4 33.8 31.2 0.0
17 18.5 26.7 30.0 1.2
18 18.8 32.4 32.3 0.6
19 17.6 28.6 33.4 0.0
20 19.7 30.3 33.4 0.0
(a) Write statement(s) to calculate minimum value for each of the columns.
(b) Write statement(s) to calculate maximum value for each of the rows.
(c) Write statement(s) to calculate variance for column Rainfall.
(d) Write statement(s) to compute mean, mode median for last 5 rows.
PART-D
18 Create DataFrame as shown below: (5)
Maths Sci English Hindi
Rakesh 92.0 94.0 NaN 97.0
Rahul NaN 94.0 93.0 97.0
Ramesh 95.0 NaN 91.0 89.0
Ravi 94.0 NaN 88.0 95.0
Rutwik 97.0 100.0 99.0 NaN
Give appropriate name for this DataFrame
i) for section ‘Maths’ fill 50 ii) for section ‘Sci’ fill 60
iii) for section ‘English’ fill 40 iv) for section ‘Hindi’ fill 70
19 A dataframe Result stores the details as (Rollno., marks). Write a program to join it with (5)
a dataframe Stu storing details as (Name, Class, Subject). Make sure that all the rows
from both the dataframes are part of the resultant dataframe.

20 What will be the result of following code statements? (2)


Given a dataframe df as shown below:
A B C
0 15 17 19
1 16 18 20
2 20 21 22
What will be the result of following code statements?
(a) df['C'] = np.NaN
(b) df['C'] = [2, 5]
(c) df['C'] = [12, 15, 27]

You might also like