XII IP Pre Board 2024 QP Setee
XII IP Pre Board 2024 QP Setee
XII IP Pre Board 2024 QP Setee
2. Which one of the following functions is used to count the no of rows from the given 1
table in MySQL?
(a) COUNT(* ) (b) CARDINALITY( )
(c) COUNT(Column name ) (d) All the above
3. A _______________ is a network device that can receive the data, analyse it and 1
transmit it to other networks.
(a) Modem (b) Hub (c) Repeater (d) Router
4. Which MySQL command helps to add a primary key constraint to any table that has 1
already been created ?
(a) UPDATE (b) INSERT INTO (c) ALTER TABLE (d) ORDER BY
Page No. 1 of 10
6. In given code dataframe ‘D1’ has _____ rows and _____ columns. 1
import pandas as pd
S1 = pd.Series([1, 2, 3, 4], index = ['a', 'b','c','d'])
S2 = pd.Series([11, 22, 33, 44], index = ['a', 'bb','c','dd'])
D1 = pd.DataFrame([S1,S2])
(a) 2, 4 (b) 4, 6 (c) 4, 4 (d) 2, 6
9. Identify the function used for reading data from a csv file. 1
(a) read.csv() (b) read_csv() (c) read_data() (d) csv_read()
11. Which of the following keywords will you use in the following query to display the 1
unique values of the column dept_name?
SELECT________ dept_name FROM COMPANY;
(a) All (b) From (c) Distinct (d) Unique
12. . Which of the following Internet services is used for instant messaging ? 1
(a) Chat (b ) Email (c) WWW (d) Python
13. Which of the following command is used to display first three rows of a DataFrame 1
'DF' ?
(a) DF.head() (b) DF.header() (c) DF.head(3) (d) DF.Head(3)
14. By restricting the server and encrypting the data, a software company's server is 1
unethically accessed in order to obtain sensitive information. The attacker blackmails
the company to pay money for getting access to the data, and threatens to publish
sensitive information unless price is paid. This kind of attack is known as:
(a) Phishing (b) Identity Theft (c) Plagiarism (d) Ransomware
Page No. 2 of 10
15. In Python Pandas, head(n) method returns the first n members of the series. What is 1
the default value of n ?
(a) 2 (b) 3 (c) 4 (d) 5
17. What will be the output of the Python program mentioned below ? 1
import pandas as pd
df=pd.DataFrame(['Apple','Banana','Orange','Grapes','Guava'])
print(df[2:4:2])
(a) 0 (b) 0
2 Banana 2 Orange
(c) 0 (d) Empty DataFrame
2 Banana Columns:[0]
4 Grapes Index:[ ]
18. The command used to give a heading to a graph using matplot is ______ 1
(a) plt.show() (b) plt.plot() (c) plt.xlabel() (d) plt.title()
19. Which type of network covers a geographical area like a city or town? 1
(a) LAN (b) MAN (c) WAN (d) PAN
Q-20 and Q-21 are Assertion (A) and Reason (R) Type questions. Choose the correct
option as:
(a) Both Assertion (A) and Reason (R) are true, and Reason (R) is the correct
explanation of Assertion (A)
(b) Both Assertion (A) and Reason (R) are true, but Reason (R) is not the correct
explanation of Assertion (A)
(c) Assertion (A) is True, but Reason (R) is False
(d) Assertion (A) is False, but Reason (R) is True
20. Assertion (A):- DataFrame has both a row and column index. 1
Reasoning (R): - A DataFrame is a two-dimensional labelled data structure like a
table of MySQL.
21. Assertion (A): In SQL, UPDATE is a Data Definition Language (DDL) Command. 1
Page No. 3 of 10
Reason (R): DDL commands are used to create, modify, or remove database
structures, such as tables.
Section-B (7 x 2 = 14 Marks)
22. What is a Series in Python Pandas? Also, give a suitable example to support your 2
answer.
OR
What does the term 'library' signify in Python? Mention one use for each of the
following libraries:
• Pandas
• Matplotlib
23. Differentiate between the active digital footprint and passive digital footprints. 2
25. Briefly explain the basic concepts of a web server and web hosting. 2
OR
Ravi is doing a course in networking. He is unable to understand the concept of URL.
Help him by explaining it with the help of suitable example.
26. Write any two differences between DELETE and DROP TABLE command of MySQL. 2
28. The Python code written below has syntactical errors. Rewrite the correct code and 2
underline the correction(s) made.
import Pandas as pd
countries=[{'country' ; 'INDIA', 'capital' : 'New Delhi'},
{'country' : 'USA', 'capital' : 'New York'},
{'country' : 'JAPAN', 'capital' : 'Tokyo'}
df=pd.DataFrame(country)
print(df)
OR
Complete the given Python code to get the required output as: Rajasthan
import _________ as pd
Page No. 4 of 10
di = {'Corbett': 'Uttarakhand', 'Sariska': 'Rajasthan', 'Kanha': 'Madhya Pradesh’,
'Gir':'Gujarat'}
NP = ___________. Series( _____ )
print(NP[ ___________ ])
Section-C (4 x 3 = 12 Marks)
29. Richa, recently started using her social media account. Within a few days, she 3
befriends many people she knows and some that she does not know. After some time,
she starts getting negative comments on her posts. She also finds that her pictures are
being shared online without her permission. Based on the given information, answer
the questions given below.
(a) Identify the type of cybercrime she is a victim of.
(b) Under which act, she can lodge a complaint to the relevant authorities?
(c) Suggest her any two precautionary measures which she should take in future
while being online to avoid any such situations.
30. Kabir, a data analyst, has stored the voter's name and age in a dictionary. Now, Kabir 3
wants to create a list of dictionaries to store data of multiple voters. He also wants to
create a DataFrame from the same list of dictionaries having appropriate row labels
as shown below :
Voter Name Voter_Age
Ar1001 Arjun 35
Ba3002 Bala 23
Go4002 Govind 25
Dh4007 Dhruv 19
Na6005 Navya 18
Help Kabir in writing a Python program to complete the task.
OR
Write a Python Program to create a Pandas Series as shown below using a
dictionary. Note that the left column indicates the indices and the right column
displays the data.
Ravi Delhi
Rahul Noida
Amit Agra
Page No. 5 of 10
31. Write MySQL statements for the following: 3
(a) To create a database named FOOD.
(b) To create a table named Nutrients based on the following specification:
Table: DEPT
DEPTNO DEPTNAME
10 Production
20 Sales
Table: STREAM
STREAM_NO STREAM_NAME
1 Science
2 Commerce
Page No. 6 of 10
Write appropriate SQL queries for the following:
(a) Display the city-wise total marks.
(b) Display the names of all the Students in uppercase whose belongs to DELHI.
(c) Display the Students name along with their corresponding Stream Name
Section-D (2 x 4 = 8 Marks)
33. Mr. Sharma is working in a game development industry and he was comparing the 4
given chart on the basis of the rating of the various games available on the play store.
He is trying to write a code to plot the graph. Help Mr. Sharma to fill in the blanks of
the code and get the desired output.
import__________________________ #Statement 1
Games=["Subway Surfer","Temple Run","Candy Crush","Bottle Shot","Runner Best"]
Rating=[4.2,4.8,5.0,3.8,4.1]
plt.______________(Games,Rating) #Statement 2
plt.xlabel("Games")
plt.______________("Rating") #Statement 3
plt._______________ #Statement 4
(a) Write the suitable code for the import statement in the blank space in the line
marked as Statement-1.
Page No. 7 of 10
(b) Refer to the graph shown above and fill in the blank in Statement-2 with
suitable Python code.
(c) Fill in the blank in Statement-3 with the name of the function to set the label on
the y-axis.
(d) Fill in the blank in Statement-4 with the name of function/method to display
the graph.
34. Based on the SQL table CAR_SALES, write suitable queries for the following: 4
OR
Predict the output of the following queries based on the table CAR_SALES given
above:
(a) SELECT LEFT(SEGMENT,2) FROM CAR_SALES WHERE FUEL=
"PETROL";
(b) SELECT (QT2-QT1)/2 "AVG SALE" FROM CAR_SALES WHERE
SEGMENT= "SUV";
(c) SELECT SUM(QT1) "TOT SALE" FROM CAR_SALES WHERE FUEL=
"DIESEL";
(d) Select LENGTH(SEGMENT) from CAR_SALES where QT1< 5000;
Section-E (3 x 5 = 15 Marks)
Page No. 8 of 10
Student Wing Hostel Wing
(i) Suggest the most suitable place (i.e. Wing) to install the server of this
organization with a suitable reason.
(ii) Suggest an ideal layout for connecting all Wings. Also write the type of
Topology.
(iii) Suggest the placement of the following devices with reasons :
a) Modem b) Switch
(iv) The Institute is planning to link its another branch “ABHI CLASSES” in Andaman
& Nicobar. Suggest the type of network (LAN, MAN, WAN) and a fast and very
effective wireless transmission medium to connect it with Jaipur, reasonably
high speed is required, cost is not the factor. Justify your answer.
(v) Suggest a protocol that shall be needed to provide Video Conferencing solution
between Jaipur and Andaman.
Page No. 9 of 10
36. Ekam, a Data Analyst with a multinational brand has designed the DataFrame df that 5
contains the four quarter’s sales data of different stores as shown below:
Store Qtr1 Qtr2 Qtr3 Qtr4
0 Store1 300 240 450 230
1 Store2 350 340 403 210
2 Store3 250 180 145 160
Answer the following questions:
(a) Predict the output of the following python statement:
(i) print(df.size)
(ii) print(df[1:3])
(b) Delete the last row from the DataFrame.
(c) Write Python statement to add a new column Total_Sales which is the addition of
all the 4 quarter sales.
(d) Rename the column name 'Store' to 'StoreName'
(e) Write Python statement to export the DataFrame to a CSV file named data.csv
stored at D: drive
37. Write the SQL queries which will perform the following operations : 5
(a) To display the day part from your date of admission, which is ‘2024-10-13’.
(b) To convert your father’s email id ‘xyz@abc.com’ to uppercase.
(c) To count the number of characters in the string ‘India’.
(d) To display today’s day name i.e., Sunday or Monday …
(e) To display your height 5.41 after rounding off to 1 decimal place.
OR
Write suitable SQL queries for the following:
(a) To calculate the exponent for 3 raised to the power of 4.
(b) To display current date and time.
(c) To round off the value -34.4567 to 2 decimal place.
(d) To remove all the probable leading and trailing spaces from the column userid
of the table named user.
(e) To display the length of the string ‘FIFA World Cup’.
Page No. 10 of 10