1. How can individuals protect themselves from identity theft ?
(a) Share personal information freely on social media
(b) Use the same password for all online accounts
(c) Shred sensitive documents, use strong passwords, and monitor financial accounts
(d) Never check bank statements
Ans. (c) Shred sensitive documents, use strong passwords, and monitor financial accounts
2. Which environmental issue is associated with electronic waste ?
(a) Ocean Acidification
(b) Air Pollution
(c) Noise Pollution
(d) Water Scarcity
Ans. (b) Air Pollution
3. _________ is a networking device which can analyse the data being carried over a network, decide or alter how it is packaged, and send it to another network of a different type.
(a) Modem
(b) Hub
(c) Router
(d) Switch
Ans. (c) Router
4. You have a table called “sales” that contains sales data for a retail store. Which SQL aggregate function can be used to calculate the total number of rows or records in the “sales” table ?
(a) MAX()
(b) MIN()
(c) AVG()
(d) COUNT()
Ans. (d) COUNT()
5. Which Python command can be utilised to create a histogram using the data in a list named ‘values’ that represents scores of students in an exam.
(a) plt.hist(values)
(b) seaborn.histplot(values)
(c) plt.plot_histogram(values)
(d) numpy.histogram(values)
Ans. (a) plt.hist(values)
6. Which of the following SQL queries is used to retrieve rows from the “customers” table where the “email” column contains NULL values ?
(a) SELECT * FROM customers WHERE email = NULL;
(b) SELECT * FROM customers WHERE email IS NOT NULL;
(c) SELECT * FROM customers WHERE ISNULL(email);
(d) SELECT * FROM customers WHERE email IS NULL;
Ans. (d) SELECT * FROM customers WHERE email IS NULL;
7. Which network topology typically results in less wire length usage as compared to others ?
(a) Star topology
(b) Mesh topology
(c) Bus topology
(d) Hybrid topology
Ans. (c) Bus topology
8. Which of the following is not protected through Intellectual Property Rights (IPR) ?
(a) Literary works
(b) Real estate properties
(c) Trademarks
(d) Patented inventions
Ans. (b) Real estate properties
9. __________ is a cyber-attack method that involves sending fraudulent emails or messages to trick individuals into revealing sensitive information, such as login credentials or financial data ?
(a) Malware Infection
(b) DDoS Attack
(c) Phishing
(d) SQL Injection
Ans. (c) Phishing
10. Assertion (A) : Cookies are small text files, stored locally by the client’s web browser to remember the “name-value pair” that identifies the client.
Reason (R) : Cookies are primarily used to track users’ physical locations.
(a) Both A and R are true and R is the correct explanation for A
(b) Both A and R are true but R is not the correct explanation for A
(c) A is True but R is False
(d) A is false but R is True
Ans. (c) A is True but R is False
11. Assertion (A) : DataFrame and its size is mutable in Pandas.
Reason (R) : Data in a Series is organised in a single column.
(a) Both A and R are true and R is the correct explanation for A
(b) Both A and R are true but R is not the correct explanation for A
(c) A is True but R is False
(d) A is false but R is True
Ans. (b) Both A and R are true but R is not the correct explanation for A
12. You have a table called “employees” with columns “department” and “salary.” You want to find the highest salary in each department and display the results in descending order of salary. Which SQL clauses should you use for this query ?
(a) GROUP BY, HAVING, ORDER BY
(b) GROUP BY, ORDER BY
(c) HAVING, ORDER BY
(d) HAVING, GROUP BY
Ans. (b) GROUP BY, ORDER BY
13. Which of the following function is used in Pandas to display the first few rows of a specific column in a Data Frame ?
(a) show()
(b) display()
(c) head()
(d) view()
Ans. (c) head()
14. Which SQL function can be used to convert a text string to uppercase ?
(a) UCASE()
(b) LENGTH()
(c) MID()
(d) LTRIM()
Ans. (a) UCASE()
15. A Series is a one-dimensional array containing a sequence of values of any data type (int, float, list, string, etc), having by default have ______ data labels.
(a) alphanumeric
(b) string
(c) decimal
(d) numeric
Ans. (d) numeric
16. You are working with a database that stores employee information. You need to retrieve the current date and time. Which SQL function would you use for this purpose ?
(a) DATE()
(b) MONTH()
(c) DAY()
(d) NOW()
Ans. (d) NOW()
17. Predict the output of the following query : SELECT ROUND(15.789, 2);
(a) 15.79
(b) 15.789
(c) 16
(d) 15.8
Ans. (a) 15.79
18. Identify FOSS from the following :
(a) MS-Windows
(b) CorelDraw
(c) Photoshop
(d) Linux
Ans. (d) Linux
19. Rashi hasjuststarted using internet. Mention her any four net-etiquette which she should follow in order to become a good netizen.
Ans. Net-etiquette :
• No copyright violation
• Share the expertise with others on the web
• One should respect the privacy of others on the web
• One should respect the diversity of others
20. Mention any four communication etiquette, which one should follow while communicating on the internet.
Ans. Communication-etiquette :
• One should be precise in communication on the web
• One should be polite in communication
• One should respect the data limits
• One should be credible
21. Consider the given data frame :
Dataf1
F1 F2 F3
D1 20 30 5
D2 40 50 10
D3 60 70 15
D4 80 90 25
Fill in the blanks to get the given output :
F1 F3
D1 20 5
D3 60 15
(a) print ( Dataf1.loc[______,_______])
F3 F2
D4 25 90
D3 15 70
(b) print ( Dataf1.loc[______,_______])
Ans.
(a) print(Dataf1.loc[[‘D1’, ‘D3’], [‘F1’, ‘F3’]])
(b) print(Dataf1.loc[[‘D4’, ‘D3’], [‘F3’, ‘F2’]])
22. Consider the given SQL QUERIES :
(i) To retrieve the length of the given string “CBSE BOARD SQP @ 2023!”, which SQL function should you use ?
(a) LCASE()
(b) MID()
(c) LENGTH()
(d) TRIM()
Ans. (c) LENGTH()
(ii) To findout if ‘@’ symbol is present in the values of email id column or not, which function out of the following should be used ?
(a) Find()
(b) Instr()
(c) FindStr()
(d)OnStr()
Ans. (b) Instr()
23. Gaytri, a data analyst has stored four employee’s name and their employee code in four dictionaries. Structure of one such dictionary is as follows :
Emp1={‘Ename’: ‘Emp Name’, ‘Ecode’:Employee code}
She clubbed these four dictionary into a list.
Write suitable Python code to store the required data of four employees in the form of list of dictionaries and create a DataFrame with appropriate column headings as shown below :
Ename Ecode
0 John 88
1 Emily 92
2 Michael 78
3 Sophia 95
Ans. import pandas as pd
data=[{‘Ename’:’John’, ‘Ecode’:88}, {‘Ename’:’Emily’, ‘Ecode’:92},
{‘Ename’:’Michael’, ‘Ecode’:78}, {‘Ename’:’Sophia’,’Ecode’:95}]
df=pd.DataFrame(data)
print(df)
24. Briefly explain the term URL. Also give one example of it.
Ans. URL stands for Uniform Resource Locator. It provides the location and mechanism (protocol) to access the resource, available on the web. URL is sometimes also called a web address. Example : http://www.ncert.nic.in
25. Find the output of the following code :
import pandas as pd
lst1=[20,35,40]
ser1=pd.Series([20,35,40])
print(lst1+ lst1)
print(ser1+ser1)
Ans.
[20, 35, 40, 20, 35, 40]
0 40
1 70
2 80
26. Clarify the role of the HAVING clause highlighting its distinctions from the WHERE clause in SQL.
Ans. HAVING clause in SQL is used to filter the results of a GROUP BY query based on aggregated values.
Distinction of having clause from where clause :
The WHERE clause is applied to individual rows in the original dataset before any grouping is performed. It filters rows based on specific column conditions.
While HAVING clause is applied to grouped results after the GROUP BY operation. Itfilters groups based on aggregated values,such as SUM, COUNT, AVG, etc.
27. Consider the following records in ‘Cars’ table and answer the given questions :
(a) Write SQL query that will give the output as :
Blu
Bla
Bro
Blu
(b) Write command for the following : To change the color of Model with code as 103 to ‘Green’.
(c) How many tuples are present in the cars table ? Also identify the most suitable column of the carstable to mark as primary key column.
Ans.
(a) SELECT LEFT(COLOR, 3) FROM Cars WHERE COLOR=’Blue’ OR
COLOR=’Black’ OR COLOR=’Brown’;
(b) UPDATE Cars SET Color = ‘Green’ WHERE CarID = 103;
(c) Number of tuples: 6
Primary key column: CarID
28. (a) SELECT Make, Model FROM Cars WHERE Price > 30000.00;
(b) SELECT COUNT(*) AS ‘TotalCars’ FROM Cars WHERE Year = 2022;
(c) SELECT CarID, Make, Model FROM Cars where price<22000;
Ans.
(a) Make Model
——————-
Ford Mustang
BMW X5
———————
(b) Total Cars
———————
2
———
(c) CarID Make Model
—————————————
106 Volkswagon Golf
—————————————
29. Complete the given Python code to get the required output as “California”:
import _____________ as pd
data = {‘Yosemite’: ‘California’, ‘Yellowstone’: ‘Wyoming’, ‘Glacier’:
‘Montana’, ‘Rocky Mountain’: ‘Colorado’}
national_parks = pd.Series(_____________)
print(national_parks_____________)
Ans.
import pandas as pd
data = {‘Yosemite’: ‘California’, ‘Yellowstone’: ‘Wyoming’, ‘Glacier’:
‘Montana’, ‘Rocky Mountain’: ‘Colorado’}
national_parks = pd.Series(data)
print(national_parks[‘Yosemite’])
30. Suppose you already have “Nutrients” table in the “FOOD” database, as described below :
Table Name: Nutrients
Column Name: Food_Item (VARCHAR)
Column Name: Calorie (INT)
Write SQL statements to perform the following tasks :
(i) Add a new column named “Plan_Start_Date” (Date) to the “Nutrients” table.
(ii) Modify the “Calorie” column to change its data type to Float.
Ans.
(i) ALTER TABLE Nutrients ADD Plan_Start_Date DATE;
(ii) ALTER TABLE Nutrients MODIFY Calorie FLOAT;
31. Imagine a scenario where an individual, Alex, is concerned about his online privacy. Alex has a social media presence and frequently posts updates, photos, and comments on various platforms. Additionally, Alex frequently uses mobile apps and visits websites for shopping and information.
(a) Explain the concept of an active digital footprint, providing examplesfrom Alex’s online activities.
(b) Describe the concept of a passive digital footprint and provide examples of how it is generated in Alex’s online interactions.
(c) Discuss the implications of both active and passive digital footprints for Alex’s online privacy and security.
Ans.
(a) Active Digital Footprint: Alex’s active digital footprint includes actions like posting photos and comments on social media platforms, making his intentional online activities visible to others.
(b) Passive Digital Footprint: Alex’s passive digital footprint is created when websites and mobile apps collect data about his browsing habits and preferences without his direct input, often for purposes like targeted advertising.
(c) implications of both active and passive digital footprints for Alex’s online privacy and security: Alex’s active digital footprint may expose him to privacy risks if he shares sensitive information publicly. His passive digital footprint, when mishandled, can lead to data privacy concerns and potentially put his personal information at risk, emphasising the need for cautious online behaviour and data protection measures.
32. With reference to 3R’s, describe three essential approaches to manage electronic waste. Also, provide practical examples of how individuals can actively participate in each approach.
Ans.
1. Reduce : Individuals can minimise e-waste by making mindful purchasing decisions,such as buying longer-lasting electronic devices and only acquiring
what is genuinely needed. For example, opting for modular smartphones with replaceable components can extend the lifespan of the device.
2. Reuse : Encouraging the reuse of electronic devices involves selling, donating, or trading-in old gadgets. For instance, individuals can refurbish and sell their old laptops to extend their use.
3. Recycle : To recycle e-waste responsibly, individuals can participate in ewaste recycling programs or drop-off centers. For instance, recycling old cell phones at designated collection points prevents them from ending up in landfills.
33. Consider the given DataFrame ‘Employees’ :
Name Employee_ID Department
Alice EMP001 HR
Bob EMP002 Sales
Carol EMP003 IT
David EMP004 Marketing
Write suitable Python statements for the following operations :
(i) Add a column called ‘Salary’ with the following data : [55000, 60000, 65000, 58000].
(ii) Include a new employee named ‘Eve’ with Employee_ID ‘EMP005’, working in the ‘Finance’ department, and a salary of 62000.
(iii) Change the name of the ‘Employee_ID’ column to ‘ID’.
Ans.
(i) Add a column ‘Salary’ df[‘Salary’] = [55000, 60000, 65000, 58000]
(ii) Include a new employee named ‘Eve’ with Employee_ID ‘EMP005’, working in the ‘Finance’ department, and a salary of 62000. Employees.loc[4] = [‘Eve’, ‘EMP005’, ‘Finance’, 62000]
(iii) Rename the ‘Employee_ID’ column to ‘ID’ df = df.rename(columns={‘Employee_ID’: ‘ID’})
34. Imagine you are assigned a task to manage the inventory of an online store. The store uses an SQL database to track product information in a table named ‘Products.’ The ‘Products’ table has columns for ‘ProductID’ (Primary Key), ‘ProductName’, ‘Category’, ‘QuantityInStock,’ and ‘PricePerUnit.’
The following scenarios represent different inventory management tasks :
(i) Restocking : Due to a recent sale, the ‘QuantityInStock’ of a product with ‘ProductID’ 101, named “Laptop,” needs to be increased by 10 units.
(ii) Product Availability Check: You need to check the availability of a product named “Wireless Mouse” in the ‘Electronics’ category.
(iii) Product Update : The price of all products in the ‘Electronics’ category should be increased by 5% to account for market changes.
(iv) Out of Stock: Identify and list the products that are currently out of stock (QuantityInStock is 0).
For each scenario, provide the SQL statements to perform the necessary action.
Ans.
(i) UPDATE Products SET QuantityInStock = QuantityInStock + 10 WHERE ProductID = 101;
(ii) SELECT * FROM Products WHERE ProductName = ‘Wireless Mouse’ AND Category = ‘Electronics’;
(iii) UPDATE Products SET PricePerUnit = PricePerUnit * 1.05 WHERE Category = ‘Electronics’;
(iv) SELECT ProductName FROM Products WHERE QuantityInStock = 0;
35. Wizbiz Corporation is recording the quarterly sales data of its three products through different departments. The data is as follows :
Qtr1 Qtr2 Qtr3 Qtr4
Product1 3500 4200 4800 5100
Product2 2800 3100 3600 3900
Product3 1500 1800 2100 2400
The company stores this information in a CSV file named “Quarterly_Sales.csv.” Mr. Raj is tasked for writing a Python program to visualise this data. He wrote the following Python code but encountered some difficulties. Help him by providing solutions to the following situations :
import pandas as pd
import _______________ as plt #line 1
df = _________________ #line 2
df.plot(_________=’bar’, color=[‘purple’, ‘orange’, ‘green’, ‘yellow’]) #line 3
plt.title (‘Quarterly Sales Report’) #line 4
plt.xlabel(‘Product’)
plt.ylabel(‘Sales’)
plt.show()
(i) Choose the correct Python library from the following options to import in line
(a) matplotlib
(b) matplotlib.plot
(c) py.plot
(d) matplotlib.pyplot
Ans. (d) matplotlib.pyplot
(ii) Choose the correct option to specify the type of graph in line 3:
(a) type
(b) kind
(c) style
(d) graph
Ans. (b) kind
(iii) Write suitable python statement to fetch the data from ‘Quarterly_Sales.csv’ into the datafarme in line 2.
Ans. pd.read_csv(‘Quarterly_Sales.csv’)
36. Write Python statement to display total sales done in ‘Qtr1’ and ‘Qtr2’ for each product.
Ans. print(df[‘Qtr1’]+df[‘Qtr2’])
37. Attempt the following questions :
(i) Write a SQL query to calculate the remainder when 15 is divided by 4.
(ii) Write a SQL query to retrieve the current year.
(iii) Write a SQL query to extract the first three characters from the string ‘Hello, World!’.
(iv) Write a SQL query to convert the text in the ‘description’ column of the ‘product’ table to uppercase.
(v) Write a SQL query to display the position of ‘-‘ in values of ACC_NO column of table Bank.
Ans.
(i) SELECT MOD(15, 4) AS Remainder;
(ii) SELECT YEAR(NOW()) AS CurrentYear;
(iii) SELECT LEFT(‘Hello, World!’, 3) AS ExtractedString;
(iv) SELECT UPPER(description) AS UppercaseDescription FROM product;
(v) SELECT INSTR(acc_no, ‘-‘) FROM bank;
38. Observe the given tables carefully and attempt the following questions:
(i) Identify the column based on which both the tables can be related or joined. Also justify your answer.
(ii) Write a SQL query to list names of all customers with their Amount in ascending order:
(iii) Write a SQL query to find the total amount of money across all branches.
(iv) Write a SQL query to count the total records in CUSTOMER table.
(v) Write a SQL query to find the minimum amount in a bank.
Ans.
(i) ACC_NO as it is present in both the tables having related values.
(ii) SELECT C.CUSTOMER_NAME, B.AMOUNT FROM CUSTOMER C JOIN BANK B ON C.ACC_NO = B.ACC_NO ORDER BY B.AMOUNT ASC;
(iii) SELECT SUM(AMOUNT) AS TOTAL_AMOUNT FROM BANK;
(iv) SELECT COUNT(*) from CUSTOMER;
(v) SELECT MIN(AMOUNT) from BANK;
39. A large educational campus with multiple departments and buildings is planning to establish an efficient network infrastructure to connect its variousfacilities. The campus comprises five main buildings, each with specific distance and computer requirements :
Distance between various buildings :
Building A to Building B: 50 meters
Building B to Building C: 30 meters
Building C to Building D: 30 meters
Building D to Building E: 35 meters
Building E to Building C: 40 meters
Building D to Building A: 120 meters
Building D to Building B: 145 meters
Building E to Building B: 65 meters
Each building hosts a varying number of computers :
Building A: 55 computers
Building B: 180 computers
Building C: 60 computers
Building D: 55 computers
Building E: 70 computers
Based on the above specifications, answer the following questions :
(a) Suggest a possible cable layout for connecting the buildings in an efficient and effective way.
(b) Name the topology used for above cable layout.
(c) Suggest the most suitable place to install the server of this organisation.
(d) Suggest the placement of the following devices.
(i) Hub/Switch
(ii) Repeater
(e) The company wants to link its head office in ‘A’ building to its Office in Sydney. What type of network this connection result into ?
Ans.
(a)
(b) Star
(c) Building B as it has maximum number of computers.
(d) (i) Hub/Switch should be placed in each building. (ii) Repeater is placed between Building B to building D.
(e) WAN
40. District wise total number of houses are represented in the following table :
Dist VII | Dist VIII | Dist IX | Dist X |
40 | 45 | 35 | 44 |
Draw the following bar graph representing the number of houses in each District(Dist VII, Dist VIII, Dist IX, Dist X).
Also, give suitable python statement to save this chart in E: drive of the computer with name ‘house.png’.
Ans.
import matplotlib.pyplot as plt
district = [‘VII’,’VIII’,’IX’,’X’]
houses = [40,45,35,44]
plt.bar(district, houses)
plt.savefig(‘e:\house.png’)
plt.show()
41. Write a python program to plot a line chart based on the given data to depict the weekly study patterns for all the seven days.
Day=[1,2,3,4,5,6,7]
Study_Hours=[5,4,6,5,7,8,10]
Also, give suitable python statement to save this chart in d: drive of the computer with name ‘study.png’.
Ans.
import matplotlib.pyplot as plt
Day=[1,2,3,4,5,6,7]
Study_Hours=[5,4,6,5,7,8,10]
plt.plot(Day,Study_Hours)
plt.savefig(‘d:\study.png’)
plt.show()
When someone writes an post he/she keeps the idea of a user in his/her brain that how a
user can understand it. Thus that’s why this post is perfect.
Thanks!
Hiya! Quick question that’s totally off topic. Do
you know how to make your site mobile friendly?
My blog looks weird when browsing from my iphone4. I’m trying to find a theme
or plugin that might be able to resolve this issue. If you
have any recommendations, please share. Cheers!