Xii Ip PB1 2021
Xii Ip PB1 2021
S1 S2
A 10 A 80
B 40 B 20
C 34 C 74
D 60 D 90
22. DataFrame is already created here. Write the answer for any four questions from (i)- (v) mentioned
below.
import pandas as pd
data = {'name': ['James', 'Anna', 'Janet', 'Yogi', 'Robin', 'Amal', 'Mohan'],
'city': ['Mexico City', 'Toronto', 'Prague', 'Shanghai','Manchester',
'Cairo', 'Osaka'],
'age': [41, 28, 33, 34, 38, 31, 37],
'score': [88.0, 79.0, 81.0, 80.0, 68.0, 61.0, 84.0]}
row_labels = [101, 102, 103, 104, 105, 106, 107]
df = pd.DataFrame(data=data, index=row_labels)
print(df)
ii. Display the city, age and score of all the students. 1
(i) print(df('city','age','score'()
(ii) print(df.iloc[1:4])
(iii)print(df[['city','age','score']])
(iv) print(df.iloc[:,1:4])
PART B
Section-I
24. Consider a given Series , M1:
Marks
Term1 45
Term2 65
Term3 24
Term4 89
38.
Ravya industries has setup its new center at Shakti Nagar for its office and web based activities. The
company compound has 4 buildings as shown in the diagram above: 5
(i)Suggest the most suitable place (i.e. School/Center) to install the server of this university with
suitable reason
ii)Suggest an ideal layout for connecting these school/center for a wired connectivity
(iii)Suggest the placement of switch with suitable reason:
(iv)The organization is planning to link its sale counter situated in various parts of the same city, which
type of network out of LAN, MAN or WAN will be formed? Justify.
(v) which topology is best suit for this network?
39. Write a program in Python Pandas to create the following DataFrame “batsman” from a Dictionary: 5
B_NO Name Score1 Score2
1 Sunil Pillai 90 80
2 Gaurav Sharma 65 45
3 Piyush Goel 70 90
4 Kartik Thakur 80 76
a) List the names of those students who obtained DIV I sorted by NAME.
b)Display a report, listing NAME, STIPEND, SUBJECT and amount of stipend received in a
year assuming that the STIPEND is paid every month.
c)To count the number of students who are either PHYSICS or COMPUTER SC graduates.
d) To insert a new row in the GRADUATE table: 11,“KAJOL”, 300, “computer sc”, 75, II
e) Write a query to display highest stipend from GRADUATE table.