0% found this document useful (0 votes)
78 views5 pages

CBSE Class XII Informatics Practices Answer Key

Uploaded by

Surjith S
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views5 pages

CBSE Class XII Informatics Practices Answer Key

Uploaded by

Surjith S
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Answer Key — Informatics Practices (065) — CBSE Class XII

Section A (Q1–Q21) — 1 mark each


1. True. (HAVING filters groups after GROUP BY.)
2. (b) Plagiarism.
3. (a) cyber troll.
4. (b) 800. (ROUND with -2 rounds to hundreds.)
5. (c) Monday. (2019-05-27 is Monday if 2019-05-26 was Sunday.)
6. (b) WHERE.
7. SELECT Username, Password FROM Users; (second option is
correct)
8. False. (CONCAT returns a string — not necessarily the same
type as arguments.)
9. (b) Power( ).
10. (a) 5. (range(5) → elements 0..4, total 5)
11. (a) print([Link](3)).
12. (There was no Q12 in file — skip if absent.)
13. (c) Web layout view.
14. (a) MAX().
15. (b) Trademark. (logos are trademarks)
16. (d) All of the above.
17. (d) curdate() (returns date in YYYY-MM-DD form)
18. (b) SMTP. (mail transfer between servers)
19. (d) Count(*) (COUNT(*) counts rows including NULLs;
other aggregates ignore NULLs)
20. A is False; R is True.
 A is false (social media do allow creating and sharing content).
 R (about not wasting time on unnecessary replies) — considered
true.
21. Both A and R are True, and R is NOT the correct
explanation for A.
 A (definition of data visualization) — True.
 R (pip install matplotlib) — True but not an explanation of A.

Section B (Q22–Q28) — 2 marks each


22A (expansions):
 SMTP — Simple Mail Transfer Protocol
 URL — Uniform Resource Locator
 TCP/IP — Transmission Control Protocol / Internet Protocol
 VoIP — Voice over Internet Protocol
22B (alternate):
 Computer Network: group of interconnected autonomous
computers that share resources and data.
 Autonomous computers: machines that operate independently
(own CPU, storage, control) but can communicate over network.
23. Error & corrected query
 Error: WHERE must appear before GROUP BY; also block=2 or 3
is incorrect syntax.
 Corrected (recommended):
SELECT block, COUNT(*)
FROM apartments
WHERE block IN (2,3)
GROUP BY block;
 (Alternative using HAVING if filtering after grouping:
SELECT block, COUNT(*)
FROM apartments
GROUP BY block
HAVING block IN (2,3);
```)

**24.** *What is a website vs webpage?*


- **Website:** collection of related webpages (hosted under a domain).
- **Webpage:** a single HTML document (one page) within a website.

**(Alternate — star vs bus topology)**


- **Star:** all nodes connect to a central hub/switch; easier to isolate
faults; more cabling.
- **Bus:** single backbone cable with nodes tapped on; simpler cabling
but single-point of failure and harder to troubleshoot.

**25.** *Create pandas Series from tuple `d1`*


```python
import pandas as pd
d1 = (100, 'Vivek', 96.3, 'A')
s = [Link](d1)
print(s)
26. Netiquette (two examples):
 Use polite, respectful language; avoid all-caps/insults.
 Don’t share private / sensitive information of others without
permission.
(Alternate — e-waste management suggestion: organized
collection + recycling/refurbishment programs, producer take-
back schemes.)
27. Outputs for the code (corrected understanding):
s = [Link]([10,20,30,40,50], index=['a','b','c','d','e'])
print(s[0]) # -> 10
print(s['a':'c']) # -> a 10
# b 20
# c 30
print(s[2]) # -> 30
print(s['a']) # -> 10
28. Given:
y1 = {'P1':5000,'P2':800,'P3':1200,'P4':1800}
y2 = {'P':1300,'Q':1400,'R':1200}
total = {1: y1, 2: y2}
df = [Link](total)
print(df)
 Index of DataFrame: union of all keys from y1 and y2 →
['P1','P2','P3','P4','P','Q','R'] (these become row index labels).
 Column names: [1, 2] (the keys of the total dictionary become
columns).

Section C (Q29–Q32) — 3 marks each


29. Outputs for SQL queries based on orders table
 Cannot produce exact numeric outputs here because the orders
table data (rows) is not included in the uploaded file — the
queries themselves are:
(i) select length(cname) from orders where qty > 100; → returns
length of cname for rows where qty>100.
(ii) select cname from orders where month(dop) = 3; → returns
cname for rows where month of dop is March.
(iii) select mod(qty, day(dop)) from orders where city =
'SATARA'; → returns remainder of qty / day(dop) for rows with
city='SATARA'.
(To get concrete results, run these queries on the actual orders
table.)
30. Operations on flights DataFrame — sample code + outputs:
# sample df as per question:
import pandas as pd
df = [Link]({
'Sr_no':[1,2,3,4],
'Year':[2022,2022,2022,2022],
'Months':['January','February','March','April'],
'Dom':[900,1000,980,1100],
'Intl':[380,550,290,410]
})
df['Total_pass'] = df['Dom'] + df['Intl']
max_dom = df['Dom'].max() # 1100
max_intl = df['Intl'].max() # 550
print(df)
 Total_pass values: [1280, 1550, 1270, 1510]
 Max Dom: 1100; Max Intl: 550.
31.
 Posting negative, demeaning comments on social profiles =
cyberbullying (or "defamation/online harassment").
 Chasing & tracking online activities = cyberstalking.
 IT Act introduced in 2000 (The Information Technology Act,
2000).
(Alternate answer: Authentication ways — something you know
(password), something you have (token/smartcard), something
you are (biometrics).)
32. SQL commands (products table)
 Number of items with discount > 10%:
SELECT COUNT(*) FROM products WHERE discount > 10;
 Highest unit price:
SELECT MAX(unit_price) FROM products;
 Names with "Baby" anywhere:
SELECT item_name FROM products WHERE item_name LIKE '%Baby%';

Section D (Q33–Q34) — 4 marks each


33. SQL statements (common portable forms):
 4 characters from 3rd left char onwards of 'HelloWorld':
SELECT SUBSTRING('HelloWorld', 3, 4);
-- or: SELECT SUBSTR('HelloWorld', 3, 4);
 Position of 'pen' in 'oppenheimer':
SELECT POSITION('pen' IN 'oppenheimer'); -- returns 3
-- or: SELECT INSTR('oppenheimer','pen');
 Remainder of 100 divided by 9:
SELECT MOD(100, 9); -- returns 1
 Trim leading & trailing spaces from column e_id in table
emp:
-- To view:
SELECT TRIM(e_id) FROM emp;
-- To update:
UPDATE emp SET e_id = TRIM(e_id);
34.
 Statement1 (fill): import pandas as pd
 Statement2 (fill): df = [Link](data)
 To print number of passengers in "Jan": (sum of ps for
Month == 'Jan')
df[df['Month'] == 'Jan']['ps'].sum() # returns 25 + 35 = 60 (from
given data)
 Alternate (change index):
[Link] = ['Air India','Indigo','Spicejet','Jet','Emirates']

Section E (Q35–Q37) — 5 marks each


35. Plotting line chart & saving (example code):
import [Link] as plt

overs = [10,20,30,40,50]
runs = [0,25,50,75,100]

[Link](overs, runs)
[Link]('Overs')
[Link]('Runs')
[Link]('Runs scored by India')
[Link](True)
[Link]('india_runs.png') # saves graph to file
[Link]()
(This will save the plotted figure as india_runs.png.)
36. SQL queries:
 Exponent 2^5:
SELECT POWER(2,5);
 Current date & time:
SELECT NOW(); -- or CURRENT_TIMESTAMP
 Round -34.4567 to 2 decimals:
SELECT ROUND(-34.4567, 2);
 Convert to uppercase:
SELECT UPPER('hindustan ki kasam');
 Length of string:
SELECT LENGTH('jay jawan jay kisan');
37. Network recommendations (short answers):
1. Where to place server: In ADMIN building (largest user base:
110 machines) — centralizing server here reduces latency for
most users.
2. Suggested topology: Star (hierarchical) — use a
switched/star layout per building (each building LAN star to its
switch), and connect building switches in a collapsed-core/star
fashion with fiber backbone between buildings for reliability and
performance. This gives easy fault isolation and scalability.
3. Networking devices:
o Within each building: Managed Ethernet switches
(24/48-port) to interconnect PCs.
o Between buildings: Fiber optic links + routers /
layer-3 switches for inter-building backbone (because
distances are tens to hundreds of meters and demand
higher bandwidth). Use routers/firewalls for WAN link to
Mumbai HQ.
4. Website type: Dynamic website (allows offers, suggestions,
forms, user interaction, admin backend).
5. Face-to-face online communication between Admin Delhi
and Mumbai HQ: (c) Video conferencing.

Common questions

Powered by AI

E-waste management benefits from organized collection and recycling programs by systematically processing discarded electronic products, thereby reducing the environmental impact. These practices recover valuable resources like metals and prevent hazardous materials from contaminating ecosystems. By establishing producer take-back schemes and refurbishing programs, waste is minimized, extending the life cycle of devices and promoting sustainable consumption .

A website is a collection of related web pages typically hosted under a single domain name. It is structured as a set of interconnected documents, usually accessed via a homepage, that provide various functionalities and information. On the other hand, a webpage is a single HTML document within a website. It is structured with HTML tags and may include assets like CSS and JavaScript to enhance its functionality and appearance .

Cyberbullying involves posting negative, demeaning comments on a person's social profiles, intending to harass or hurt them publicly. It is distinct from cyberstalking, which involves tracking a person's online activities obsessively, often to instill fear or control over them. While cyberbullying is usually more public and directly confrontational, cyberstalking is more covert and persistent, often involving monitoring or gathering personal information to threaten .

Netiquette refers to the set of rules and guidelines for maintaining etiquette and courtesy in digital communication. Examples include using polite and respectful language, avoiding all-caps which can be perceived as yelling, and refraining from sharing others' private or sensitive information without permission. Its importance lies in fostering respectful interactions and safeguarding personal privacy, which is crucial in environments where tone and intent can easily be misinterpreted .

Dynamic websites, which allow user interaction and content updates in real time, face greater security challenges than static websites. They are more susceptible to attacks such as SQL injection and cross-site scripting because they interact with databases and process user inputs. Static websites serve pre-written content and are less interactive, offering fewer points of vulnerability. However, dynamic websites can incorporate security measures, like input validation and regular updates, to mitigate risks .

The CONCAT function in SQL is used to concatenate two or more strings into one string. It might produce unexpected results because it returns a string, which may not necessarily be of the same type as the arguments if they are not strings. For instance, when integers or other non-string types are provided, implicit type conversion can occur, altering the expected outcome. This behavior requires careful handling of data types when using CONCAT .

Star topology connects all nodes to a central hub or switch, offering easy fault isolation because a failure in one cable does not affect others—only the failed connection stops working. This topology is scalable, as adding new nodes doesn't disrupt the network, though it requires more cabling. Bus topology features a single backbone cable with nodes tapped in; a failure in the backbone can bring down the entire network, and it is less scalable because the network's length is limited by the cable's capacity .

Using a star (hierarchical) network topology for connecting buildings in an organization offers significant advantages in reliability and scalability. This topology allows for easy fault isolation, as a failure in one connection does not affect others, and simplifies network management. Fiber optic links between buildings provide high bandwidth, essential for handling large data transfers with minimal latency over distances typical of organizational campuses. These features ensure efficient communication and robust performance, critical for supporting large numbers of users and enhancing resilience .

In SQL, the correct sequence for filtering groups is to use the WHERE clause before the GROUP BY clause and the HAVING clause after GROUP BY. This is necessary because WHERE is used to filter records before any grouping is performed, and HAVING is used to filter groups that result from the GROUP BY clause. In other words, WHERE filters rows, and HAVING filters the aggregated data .

To find the highest unit price in a products table, you would use the SQL command SELECT MAX(unit_price) FROM products; This query calculates the maximum value of the unit_price column, effectively returning the highest unit price available in the table. MAX is a suitable aggregate function for this purpose because it efficiently evaluates the largest value from a dataset, which is crucial for price analyses or audits .

You might also like