12 IP PreBoard1QP
12 IP PreBoard1QP
Page 1 of 6
St. Mary’s School Dahod
Q13. Which of the following commands will show the last five rows from a Pandas Series, named pandasSeries
(A) pandasSeries.Tail( ) (B) pandasSeries.tail(5) (C) pandasSeries.TAIL(5) (D)
tail(5).pandasSeries
Q14. Samvit works in a bank. One day, he received an email stating that the bank’s server was seized, and the
bank had to pay money in bitcoins to get the server back. This kind of attack is known as:
(A) Identity Theft (B) Phishing (C) Ransomware (D) Plagiarism
Q15. While creating a Series from a dictionary, if no index is specified, the ___________ are used to represent
the index of the Series.
(A) Keys of a dictionary (B) Values of a dictionary
(C) key-value pairs of a dictionary (D) sequence of numbers starting from 0
Q16. Which of the following functions is used to display the cardinality of a table in MySQL?
(A) COUNT() (B) COUNT(ROWS) (C) COUNT(COLUMNS) (D) COUNT(*)
Q17. Which of the following commands is the correct way to select a column labeled city from a DataFrame
named DF?
(A) DF.label['city'](B) DF.loc[:,'city'](C) DF.head['city'] (D) DF.tail['city']
Q18. Which method is used to save the output of pyplot as an image file, say, filename?
(A) pyplot.savefig("filename.png") (B) pyplot.save_figure(filename)
(C)pyplot.save(filename) (D) pyplot.save_fig(filename)
Q19. Abha has created a document on a desktop computer in her lab. She wants to print it out using a printer in
the lab that is available on the same network. Which type of network is formed in this case?
(A) WAN(B) MAN (C) PAN (D) LAN
Choose the correct option for Q20 and Q21
i. Both A and R are true and R is the correct explanation for
ii. Both A and R are true and R is not the correct explanation for A Q20
iii. A is True but R is FalseQ21
iv. A is false but R is True
Q20. Assertion (A): To use the pandas library in a Python program, one must import it.
Reasoning (R): pandas provide two data structures for processing the data – Series and DataFrame.
Q21. Assertion (A): To retrieve data from a table in MySQL, SELECT statement is used.
Reasoning (R): SELECT is a DDL command.
SECTION B
Q22. In the context of the Pandas library in Python, explain the key differences between a Series and a
DataFrame.
A Series is a one-dimensional labeled array that can hold data of any type (integers, strings, floats,
etc.). It is similar to a column in a table.
A DataFrame is a two-dimensional labeled data structure, similar to a table or a spreadsheet. It
consists of rows and columns. Each column in a DataFrame is a Series.
OR
Q22. What do you mean by indexing in Pandas? Write the names of two forms of indexing used in Pandas.
Indexing in Pandas refers to selecting particular rows and columns of a DataFrame or Series.
It is used for data selection, filtering, and alignment.
Two forms of indexing in Pandas are:
1. Label-based indexing (using .loc[])
2. Position-based indexing (using .iloc[])
Q23. Differentiate between the active digital footprint and passive digital footprints.
Active Digital Footprint: Created when a user intentionally shares information online, such as
posting on social media or filling out a form.
Passive Digital Footprint: Collected without the user's knowledge, such as websites tracking a
user's browsing history or IP address.
Browser Cookies are small files stored on a user's device by websites. They help websites
remember user preferences, login details, and session information.
Advantage: Cookies enhance the user experience by enabling features like auto-login and
customized content.
Q26. Mention any two health hazards associated with inappropriate and excessive use of gadgets.
Eye strain and vision problems (e.g., Computer Vision Syndrome).
Increased risk of repetitive strain injuries (e.g., carpal tunnel syndrome).
Q27. Mention two health concerns associated with excessive use of Digital Devices.
Q28. The Python code below contains errors. Rewrite the correct code and underline the corrections made.
import Pandas as pd
df ={"HP":{"Desktops","Laptops","Printers"},"Sales":[10,14,9]}
df= pd.DataFrame(DF)
print("df")
import pandas as pd # "Pandas" corrected to "pandas"
df = {"HP": ["Desktops", "Laptops", "Printers"], "Sales": [10, 14, 9]} # Curly braces changed to square
brackets for lists
df = pd.DataFrame(df) # "DF" corrected to "df"
print(df) # Removed quotes from df
OR
Q28. Complete the given Python code to get the required output (ignore the dtype attribute) as
Output:
Tamil Nadu Chennai
Uttar Pradesh Lucknow
Manipur Imphal
Code:
import _______ as pd
data = ['Chennai','_______','Imphal']
indx = ['Tamil Nadu','Uttar Pradesh','Manipur']
s = pd.Series(_______, indx)
print(_______)
SECTION C
Q29. Describe the following terms:
(i) FOSS (ii) IPR (iii) Cyber Bullying
Q30. Using a dictionary, write a code snippet to create the following DataFrame named players.
OR
Q30. What will be the output produced on the execution of the following code snippet?
Page 3 of 6
St. Mary’s School Dahod
import pandas as pd
values = pd.Series([10, 5, 15, 0, -5, 20], index = ['A', 'B', 'C', 'D', 'E', 'F'])
print(values['A' : 'C'])
print(values.loc['A'])
print(values[4])
Q31. Write MySQL statements for the following:
(i) To create a database named Stationery.
(ii) To create a table named Pens within Stationery. The specifications of table Pens are given below:
TABLE: TRAVEL
SECTION D
Q33. Kapil wants to be a cricket coach. He wants to analyze the runs scored in the 10-over intervals, that is, 1-
10, 11-20, 21-20, 31-40, and 41-50. The runs scored by his team are given below:
runs = [75, 39, 48, 70, 85]
Write a Python program to generate a bar chart using the provided data. Ensure the chart includes an
appropriate title and labels for the x-axis and y-axis.
OR
Q33. Write Python code to plot a bar chart for India’s medal tally as shown below:
Page 4 of 6
St. Mary’s School Dahod
Page 5 of 6
St. Mary’s School Dahod
As a network expert, you are required to give the best possible solutions for the following queries of the
university administration:
a.Suggest cable layout for the connections between the various buildings,
b.Suggest the most suitable building to house the network server.
c.Suggest the placement of the following devices:
(i)Switch/Hub
(ii)Repeater
d.Which of the following transmission mediums can ensure fast Internet connectivity throughout the
campus?
(i)Optical Fibre
(ii)Coaxial cable
(iii)Ethernet Cable
e.The school plans to host an online webinar with an expert in Mumbai for all its teachers. Which
network protocol will be used for the webinar?
Q36. Consider the DataFrame, dfEmp, as shown below:
Page 6 of 6