1. State whether the following statement is True or False:
Slicing can be used to extract a specific portion from a Pandas Series.
Ans: True
2. The purpose of WHERE clause in a SQL statement is to:
a) Create a table
b) Filter rows based on a specific condition
c)Specify the columns to be displayed
d)Sort the result based on a column
3. Identify the networking device responsible for routing data packets based on their destination addresses.
a) Modem
b) Hub
c) Repeater
d) Router
4. Identify the SQL command used to delete a relation (table) from a relational database.
a) DROP TABLE
b) REMOVE TABLE
c) DELETE TABLE
d) ERASE TABLE
5. e-waste refers to:
a) Software that has become obsolete
b) Data that has been deleted from a storage device
c) Viruses that infect computers
d) Electronic devices that are no longer in use
6. Which of the following Python statements can be used to select a column column_name from a DataFrame df?
a) df.getcolumn('column_name')
b) df['column_name']
c) df.select('column_name')
d) df(column_name)
7. By default, the plot() function of Matplotlib draws a ______ plot.
a) histogram
b) column
c) bar
d) line
8. State whether the following statement is True or False:
In SQL, the HAVING clause is used to apply filter on groups formed by the GROUP BY clause.
Ans: True
9. Which of the following Python statements is used to import data from a CSV file into a Pandas DataFrame (Note: pd is an alias for pandas)?
a) pd.open_csv('filename.csv')
b) pd.read_csv('filename.csv')
c) pd.load_csv('filename.csv')
d) pd.import_csv('filename.csv')
10. What is plagiarism?
a) Using copyrighted material without giving proper acknowledgement to the source
b) Downloading illegal software
c) Spreading misinformation online
d) Hacking into computer systems
11. Fill in the Blank
The COUNT(*) function provides the total number of _______ within a relation (table) in a relational database.
a) Columns
b) Unique values
c) Not-null values
d) Rows
12. In which of the network topologies do all devices connect to a central point, such as a switch or hub?
a) Star
b) Bus
c) Tree
d) Mesh
13. In a Pandas DataFrame, if the tail() function is used without specifying the optional argument indicating the number of rows to display, what is the default number of rows displayed, considering the DataFrame has 10 entries?
a) 0
b) 1
c) 4
d) 5
14. Identify the type of cybercrime that involves sending fraudulent emails to deceive individuals into revealing sensitive information.
a) Hacking
b) Phishing
c) Cyberbullying
d) Cyberstalking
15. While creating a Series using a dictionary, the keys of the dictionary become:
a) Values of the Series
b) Indices of the Series
c) Data type of the Series
d) Name of the Series
16 Match the following SQL functions/clauses with their descriptions:
|
SQL Function |
Description |
| P. |
MAX() |
1. Find the position of a substring in a string. |
| Q. |
SUBSTRING() |
2. Returns the maximum value in a column. |
| R. |
INSTR() |
3. Sorts the data based on a column. |
| S. |
ORDER BY |
4. Extracts a portion of a string. |
a) P-2, Q-4, R-3, S-1
b) P-2, Q-4, R-1, S-3
c) P-4, Q-3, R-2, S-1
d) P-4, Q-2, R-1, S-3
17. Fill in the Blank
Boolean indexing in Pandas DataFrame can be used for _______.
a) Creating a new DataFrame
b) Sorting data based on index labels
c) Joining data using labels
d) Filtering data based on condition
18. Which Matplotlib plot is best suited to represent changes in data over time?
a) Bar plot
b) Histogram
c) Line plot
d) Histogram & Bar plot
19. Which type of network covers a small geographical area like a single office, building, or school campus?
a) PAN
b) MAN
c) LAN
d) WAN
Q-20 and Q-21 are Assertion (A) and Reason (R) Type questions.
20. Assertion (A): We can add a new column in an existing DataFrame.
Reason (R): DataFrames are size mutable.
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
21. Assertion (A): In SQL, INSERT INTO is a Data Definition Language (DDL) Command.
Reason (R): DDL commands are used to create, modify, or remove database structures, such as tables.
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