Page 37 - IPP-12-2025
P. 37
9. Which of the following Python statements is used to write Pandas dataframe df to a CSV file named
output.csv? (Assume pd is an alias for Pandas). [1]
(a) pd.to_csv('output.csv', df)
(b) df.to_csv('output.csv')
(c) pd.write_csv(df, 'output.csv')
(d) df.write_csv('output.csv')
10. Which of the following is an example of Free and Open-Source Software (FOSS)? [1]
(a) Microsoft Windows (b) Adobe Photoshop
(c) Linux (d) Apple macOS
11. Fill in the blank. [1]
To find the total number of unique values in a column, you would use ................. aggregate function.
(a) COUNT (b) COUNT(DISTINCT)
(c) SUM (d) AVG
12. In which network topology does the entire network fail if the central device stops functioning? [1]
(a) Star (b) Bus
(c) Tree (d) Mesh
13. What happens if you pass a negative number as an argument to head() function in Pandas? [1]
(a) Returns no rows (b) Displays the last row instead of the first
(c) Throws an error (d) Displays all rows
14. Which of the following is not considered hacking? [1]
(a) Accessing a secure system by breaking its password
(b) Writing code to exploit a security vulnerability
(c) Posting offensive comments on someone’s social media profile
(d) Using malware to take control of someone’s device
15. What will happen if you try to access a Pandas series element using an index that does not exist? [1]
(a) It will return None.
(b) It will raise a KeyError.
(c) It will return NaN.
(d) It will raise a ValueError.
16. Match the following SQL clauses/functions with their descriptions: [1]
SQL Clauses/Functions Description
P. SUM() 1. Removes duplicate rows
Q. GROUP BY 2. Filters rows based on a pattern
R. LIKE 3. Groups rows that have the same values based on column values
S. DISTINCT 4. Returns the total(sum) of a numeric column
(a) P-4, Q-3, R-2, S-1 (b) P-4, Q-2, R-3, S-1
(c) P-1, Q-2, R-3, S-4 (d) P-2, Q-4, R-1, S-3
17. Fill in the blank. [1]
To rename columns in a Pandas dataframe, the method.................. is used.
(a) rename() (b) change_columns()
(c) update_columns() (d) rename_columns()
18. Which Matplotlib plot is ideal for representing the frequency distribution of a dataset? [1]
(a) Line plot (b) Histogram
(c) Bar plot (d) None of these
19. Which type of network is typically used to connect devices like smartphones, smartwatches and personal
computers in close proximity? [1]
(a) MAN (b) PAN
(c) WAN (d) LAN
P.10 Informatics Practices with Python–XII