1. State whether the following statement is True or False:
The drop() method can be used to remove rows or columns from a Pandas DataFrame.
Ans: True
2. What will be the result of the following SQL query?
SELECT MOD(5, 6);
a) 3
b) 5
c) 6
d) 0
3. Shruti received an email that appeared to be from a popular social media platform, requesting her to click a link to reset her password. The link directed her to a fraudulent website designed to capture her login credentials. This situation is an example of which type of cybercrime?
a) Cyber Bullying
b) Violation of Intellectual Property Rights
c) Hacking
d) Phishing
4. Which of the following Python statements is used to write a Pandas DataFrame df to a CSV file?
a) df.to_csv()
b) df.write_csv()
c) df.to_table()
d) df.export_csv()
5. Which of the following device is used for converting digital signals from a computer into analog signals for transmission over a telephone line.
a) Modem
b) Switch
c) Repeater
d) Router
6. What is the purpose of the ROUND(num, 0) in SQL, assuming num is a number with a fractional part?
a) Rounds the number to the nearest integer
b) Always rounds the number up
c) Leaves the number unchanged
d) Always rounds the number down
7. Aarushi has written a novel and wants to protect her literary work. Which type of Intellectual Property right will help her do that?
a) Patent
b) Copyright
c) Trademark
d) Both Copyright & Trademark
8. The default index used in a Pandas Series, if no index is explicitly specified, is _____
a) Strings starting with 'a'
b) Consecutive integers starting from 1
c) Random integers
d) Consecutive integers starting from 0
9. Consider a table named Students that has one primary key and three alternate keys. How many candidate keys does the table have?
a) 1
b) 2
c) 3
d) 4
10. Which of the following is an application of VoIP technology?
a) Email
b) Chat
c) Internet Telephony
d) Web Browsing
11. Which of the following SQL function is used to count the non-NULL values in a column named column_name?
a) COUNT(*)
b) COUNT(column_name)
c) SUM(column_name)
d) AVG(column_name)
12. When two Pandas Series with different indices are added, the result is _____.
a) Error occurs
b) Indices are ignored, and elements are added in order
c) The result has all indices, with missing values filled as NaN
d) Only the common indices are retained in the result
13. In India, the primary law that deals e-commerce and cybercrime is _____.
a) Cybercrime Prevention Act, 2000
b) Digital Security Act, 2000
c) Information Technology Act, 2000
d) E-Commerce Regulation Act, 2008
14. Which SQL command is used to sort rows in either ascending or descending order of values in a specific column?
a) ORDER BY
b) SORT BY
c) GROUP BY
d) SORT ON
15. Which of the following Python commands selects the first 3 rows of a DataFrame df, assuming that labelled index are consecutive integers starting from 0?
a) df.loc[:3]
b) df.loc[:2]
c) df.loc[0:4]
d) df.loc[1:4]
16. In which network topology is every node directly connected to every other node?
a) Star
b) Tree
c) Mesh
d) Bus
17. What is the use of the INSTR() function in SQL?
a) To replace characters in a string
b) To find the length of a string
c) To find the position of a substring in a string
d) To extract characters from a string
18. Which of the following Python statements creates an empty Pandas DataFrame (Note: pd is an alias for pandas)?
a) pd.DataFrame(None)
b) pd.DataFrame()
c) pd.DataFrame([])
d) pd.DataFrame.empty()
19. Which of the following is NOT an aggregate function in SQL?
a) MIN()
b) SUM()
c) UPPER()
d) AVG()
Q.20 and Q.21 are Assertion (A) and Reason (R) Type questions. Choose the correct option as:
20. Assertion (A): The output of print(df) and print(df.loc[:]) will be same for a DataFrame df.
Reason (R): The statement print(df.loc[:]) will display all rows and columns of the DataFrame df, thus showing the entire data.
a) Both A and R are True, and R correctly explains A
b) Both A and R are True, but R does not correctly explain A
c) A is True, but R is False
d) A is False, but R is True
21. Assertion (A): The INSERT INTO command is a DML (Data Manipulation Language) command.
Reason (R): DML commands are used to insert, update or delete the data stored in a database.
a) Both A and R are True, and R correctly explains A
b) Both A and R are True, but R does not correctly explain A
c) A is True, but R is False
d) A is False, but R is True