HY Exam Revision
(11/9/2024)
1) Create the series using dictionary method
Table 350
Chair 200
Sofa 800
Stool 150
2) Create a series with first four months as index and no of
days in it as data using the following methods.
a) List
b) Dictionary
3) Write a code to create the given series from two different
lists.
January 31
February 28
March 31
April 30
May 31
June 30
4) Differentiate between series and dataframe with suitable
example.
12/9/2024
1) Series object s11 stores the charity contributions made by
each section
A 6700
B 5600
C 5000
D 5200
Write a statement to display:
i) Sections that made a contribution of more than Rs.
5500\-
2) Consider the series s1 output and do the following:
pencils 20
notebooks 33
scales 52
erasers 10
dtype: int64
i) To remove the 3rd data from the series.
ii) To remove the 2nd and 4th data from the series.
3) What will be the output produced by the following
programming statements 1 & 2?
import pandas as pd
S1=pd.Series(data=[31,41,51])
print(S1>40) -->Statement1
print(S1[S1>40]) -->Statement2
4) What will be the output of the following code?
import pandas as pd
import numpy as np
data=np.array([‘a1’,’b1’,’c1’,’d1’,’e1’,’f1’])
s=pd.Series(data)
print(“I.”)
print(s[:4])
print(“II.”)
print(s[-4:])
5) Given two series S1 and S2
S1 S2
A 39 A 10
B 41 B 10
C 42 D 10
D 44 F 10
Find the output for following python panda’s statements?
a. S1[ : 2]
b. S2[ : : -1]
6) What will be the output of the following code:
>>>import pandas as pd
>>>A=pd.Series([81,89,34,27,90,45])
>>>print(A.sort_values())
14/09/2024
1) What will be the output of the following code:
import pandas as pd
S1=pd.Series([18,24,80],index=['V','Y','Z'])
S2=pd.Series([9,12,7,8],index=['X','Y','Z','V'])
s=pd.Series(S1+S2)
print(s)
2)
3) Given are two objects, a list object namely lst1 and a Series
object ser1, both are having similar values i.e, 2,4,6,8..find the
output produced by the following statements:
i) print(lst1 *2)
ii) print(ser1*2)
4) What will be the output of the following program?
import pandas as pd
fst1=[9,10,11]
scd=pd.Series(fst)
ob1=pd.Series(data=fst1*2)
ob2=pd.Series(data=scd*2)
print(“ob1”)
print(ob1)
print(“ob2”)
print(ob2)
5) What will be the output of the following program:
import pandas as pd
s=pd.Series([1,2,3,4,5],index=[‘a’,’b’,’c’,’d’,’e’])
print(s*3)
print(s>2)
s[‘e’]=6
print(s)
16/09/2024
1) Create the DataFrame df that contains data about the
results of Schools that participated in national level sports
and ‘NO1’, ‘NO2’, ‘NO3’, ‘NO4’, and ‘NO5’ as indexes
shown below using the list of dictionaries method.
School Tot_students Topper First_Runnerup
NO1 APS 40 32 8
NO2 DPS 30 18 12
NO3 KVS 20 18 2
NO4 JNV 18 10 8
NO5 SBS 28 20 10
2) Create the DataFrame STUdf, using the nested list method.
ROLLNO NAME CLASS MARKS
Stu1 1 AMAN IX 42
Stu2 2 RAMAN X 37
Stu3 3 SURAJ IX 40
18/9/2024
1)Consider the given DataFrame ‘Forest’:
State GArea VDF
State1 Assam 6789 423.70
State 2 Kerala 33825 1225.00
State3 Delhi 78990 1356.00
Write suitable Python statements for the following:
i. Add a column called TArea with the following data:
[5432,7896,4400]
ii. Delete the columns having labels ‘VDF’.
iii. Add a row Karnataka with GArea 5678 and TArea 6780.
2) Consider the given dataframe df:
(i) Add a column ‘debt’ with value 10 for each state(row).
(ii) Add new state MP with population 10.5
(iii) Remove the column debt.
3) Mr. Ajay, a data analyst has designed a dataframe df that
contain data about marks obtained by students in different
subjects. Answer the following questions:
Accountancy Economics IP
Ayush 92 82 72
Karan 87 89 87
Tarun 95 88 97
(a) Predict output of following python statement:
(i) df.shape
(ii) df[1:]
(b) Write python statement to display the marks of ayush and
tarun.
(c) Write python statement to compute the sum of marks of all
the subjects of given dataframe and add it as another column.
19/9/2024
1) WAP to create a dataframe to read data from a CSV file
Employee.csv and do the following operations:
i) Dataframe should not use file’s column header rather
should use own column numbers as 0, 1, 2 and so on.
ii) Dataframe should use own column headings as EmpID,
EmpName, Designation and Salary.
iii) To read the records from the file in dataframe and
print the middle row stored in the csv file.
Employee.CSV
0 1 2 3
Empno, Name, Designation,
Salary
1001, Trupti, Manager,
56000
1002, Raziya, Manager,
55900
1003, Simran, Analyst,
35000
1004, Silviya, Clerk,
25000
1005, Suji, PR,
31000
2) Consider the following file medaltally.csv and answer the
given statements.
i) to be read with rows 1,3,4,5 to be skipped.
ii) to be read with user specified column names 'Gold',
'Silver', and 'Bronze'.
iii) The default delimiter ',' in a csv file can be changed by
setting the sep argument in to_csv. Here delimiter is
changed to '#'
23/9/2024
1)Write the python code to draw following bar graph representing the number of
students in each class.
2) Write Python code to plot a bar chart based on the rating of the various games
available on the play store as shown below:
3) Write python code to depict the data of India/England semi final runs by over on line
chart. The data as following:
i) Display the overs as same as given here on x-axis.
ii) Apply the line colours as – India : Blue, England: Red
iii) Apply appropriate labels iv) Apply chart label – T20W Cup 2022 : Semi-final 2
24/9/2024
1) Consider the following graph. Write a program in python to draw it. (Height of
Bars are 10,1,0,33,6,8)
2) Write the python code to plot the given histogram with the following data set:
Score=[8,10,15,25,28,35,47,49,50,63,67,53,57,58,69]
Also give suitable python statement to save this chart.
25/9/2024
1) Define Network.
2) Examples of network.
3) Define computer network.
4) Name the types of hosts in a computer network.
5) Name some networking devices.
6) Data is transferred in _____________.
7) Devices in a network can be connected either through _________ or _________
8) Each device that is a part of a network and that can_________, _________
_________________ or _________ data to different network routes is called a
_______________.
9) Network allows sharing of resources.Justify this statement with suitable example.
10) Based on the geographical area covered and data transfer rate, computer networks
are broadly categorised a
11) LAN can range from a single room, a floor, an office having one or more buildings in
the same premise, laboratory, a school, college, or university campus.
12) LAN networks can be extended up to ___________. Data transfer in LAN is quite
high, and usually varies from ______ to _________ Mbps
13) Define Ethernet.
14) Mbps stands for ____________
15) _________ or cable based broadband in
16) ternet services are examples of MAN.
17) This kind of network Internet and Web can be extended up to _________________.
18) ______________ connects computers and others LANs and MANs, which are
spread across different geographical locations of a country or in different countries
or continents.
19) How can we form a WAN?
20) Define Internet.
26/9/2024
1) Explain any two networking devices with suitable examples.
2) Compare and contrast star and bus topology with a suitable sketch.
3) The Virtual connects organization has set up its new center at Noida for its office
and web-based activities. It has 4 blocks of buildings as shown in the diagram
below:
Number of computers:
Block A 25
Block B 50
Block C 125
Block D 10
Distance between the various blocks is as follows:
A to B 40 m
B to C 120m
C to D 60 m
A to D 170 m
B to D 150 m
A to C 70 m
(i) Suggest the most suitable place (the block) to install the server of this organization with a
suitable reason.
(ii) Suggest an ideal layout for connecting these blocks/ centers for a wired connectivity.
(iii) Which device will you suggest to be placed / installed in each of these blocks to efficiently
connect all the computers within these blocks?
(iv) Suggest the placement of a repeater in the network with justification.
(v) The organization is planning to links its office to an office in the hilly areas. Suggest a way to
connect it economically justify your answer.
4)Ravya industries has set up its new center at kaka nagar for its office and web based
activities. The company compound has 4 buildings as shown in the diagram below:
(i)Suggest most suitable place to house server of this company with proper reason.
(ii) Suggest the layout of connection between the blocks and identify the topology of the layout.
(iii) Suggest the placement of the Modem in the network with justification.
(iv) Suggest the placement of a repeater in the network with justification
. (v) What type of network would be formed if the Raipur office is connected to their New Delhi
office?