0% found this document useful (0 votes)
7 views8 pages

Class XII Informatics Practices Practice Paper

This document is a practice paper for Class XII Informatics Practices, consisting of 37 compulsory questions divided into five sections with varying marks. It includes multiple-choice questions, programming tasks, SQL queries, and case studies, all focused on Python and database management. The paper emphasizes the importance of e-waste management, cyber ethics, and practical applications of programming and SQL in data handling.

Uploaded by

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

Class XII Informatics Practices Practice Paper

This document is a practice paper for Class XII Informatics Practices, consisting of 37 compulsory questions divided into five sections with varying marks. It includes multiple-choice questions, programming tasks, SQL queries, and case studies, all focused on Python and database management. The paper emphasizes the importance of e-waste management, cyber ethics, and practical applications of programming and SQL in data handling.

Uploaded by

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

APPENDIX E

PRACTICE PAPER
CLASS XII
INFORMATICS PRACTICES (065)
Time Allowed: 3 hrs Maximum Marks: 70

General Instructions:
• Please check this question paper contains 37 questions.
• All questions are compulsory. However, internal choices have been provided in some questions. Attempt
only one of the choices in such questions.
• The paper is divided into 5 Sections—A, B, C, D and E.
• Section A consists of 21 questions (1 to 21). Each question carries 1 Mark.
• Section B consists of 7 questions (22 to 28). Each question carries 2 Marks.
• Section C consists of 4 questions (29 to 32). Each question carries 3 Marks.
• Section D consists of 2 case study type questions (33 to 34). Each question carries 4 Marks.
• Section E consists of 3 questions (35 to 37). Each question carries 5 Marks.
• All programming questions are to be answered using Python Language only.
• In case of MCQ, text of the correct answer should also be written.

Section A (21 × 1 = 21 Marks)


1. State whether the following statement is True or False: [1]
If a series has no explicitly defined index, it automatically assigns a string index.
2. What does HAVING clause do in SQL? [1]
(a) Filters all the records before grouping them
(b) Filters all the records after grouping them
(c) Sorts records in descending order
(d) Specifies conditions for column aliases
3. Which device is used to connect two different types of networks and translate protocols? [1]
(a) Gateway (b) Hub
(c) Router (d) Repeater
4. Identify the SQL command that is used to modify an existing table structure. [1]
(a) UPDATE (b) ALTER TABLE
(c) MODIFY TABLE (d) CHANGE TABLE
5. Which one is the best practice for managing e-waste? [1]
(a) Dumping it in landfills (b) Recycling and proper disposal of components
(c) Burning it to reduce volume (d) Ignoring e-waste altogether
6. Which of the following commands is used to drop column ‘col_name’ from dataframe df? [1]
(a) [Link](columns=['col_name'])
(b) [Link]('col_name')
(c) [Link]('col_name')
(d) [Link]('col_name')
7. Which parameter is used in [Link]() function to specify the number of bins in a histogram? [1]
(a) intervals (b) bins
(c) divisions (d) steps
8. State whether the following statement is True or False: [1]
In SQL, ALTER TABLE statement can be used to delete rows from a table.
9. Which of the following Python statements is used to write Pandas dataframe df to a CSV file named
[Link]? (Assume pd is an alias for Pandas). [1]
(a) pd.to_csv('[Link]', df)
(b) df.to_csv('[Link]')
(c) pd.write_csv(df, '[Link]')
(d) df.write_csv('[Link]')
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

A.44 Informatics Practices with Python–XII


Questions 20 and 21 are Assertion and Reasoning Based Questions. Mark the correct choice as
(a) Both Assertion (A) and Reason (R) are true and Reason (R) is the correct explanation for Assertion (A).
(b) Both Assertion (A) and Reason (R) are true but Reason (R) is not the correct explanation for
Assertion (A).
(c) Assertion (A) is true but Reason (R) is false.
(d) Assertion (A) is false but Reason (R) is true.
20. Assertion (A): Data in a Pandas dataframe can be modified by assigning new values to specific rows or
columns.[1]
Reasoning (R): Pandas dataframes are immutable, so once created, modifications are not allowed.
21. Assertion (A): In SQL, INSERT INTO is a Data Definition Language (DDL) Command. [1]
Reasoning (R): DDL commands are used to create, modify and remove database structures such as tables.

Section B (7 × 2 = 14 Marks)
22. Can a Pandas series contain multiple data types? Give a suitable example to support your answer. [2]
Or
How can we check if dataframe ‘df’ has any missing value?
23. What do you mean by cyber ethics and why are they important for us? [2]
24. Consider the string Artificial Intelligence and Machine Learning and write suitable SQL queries for the
following:[2]
(a) Extract and display the last 7 characters from the string.
(b) Convert the string into uppercase and display the result.
25. Differentiate between Website and Web Page. [2]
Or
What is URL? Explain with the help of an example.
26. Differentiate between char and varchar data type in SQL by giving suitable examples. [2]
27. List at least three emotional and physical symptoms of internet addiction. [2]
28. Kabir is creating a dataframe from a list of tuples but his code contains mistakes. Identify the errors,
rewrite the correct code and underline the corrections made. [2]
import Pandas as pd
data = [('John', 25), ('Sana', 22), (Zara, 28)]
columns = ('Name', 'Age')
df = [Link](data, column=columns)
print(df)
Or
Complete the given Python code to get the required output (ignore the dtype attribute) as:
Output:
Physics 80
Math 90
Chemistry 85

Code:
import _______ as pd
data = [80, 90, 85]
index = ['Physics', 'Math', _______]
s = [Link](data, index=_______)
print(_______)

Section C (4 × 3 = 12 Marks)
29. A local office is upgrading its printers and has decided to dump the old ones at a nearby ground. [3]
(a) What toxic substances could leach into the soil or water due to improper disposal of printers?
(b) Suggest a better way to dispose of or repurpose old printers.
(c) Highlight the significance of proper e-waste management for future generations.

Appendices A.45
30. Write a Python program to create the following dataframe using a dictionary of lists: [3]
Item Cost Stock
0 Pen 10 500
1 Notebook 50 200
2 Eraser 5 700
3 Pencil 15 600
Or
Write a Python program to create a Pandas series, as shown below, using a dictionary. Note that the left
column indicates the indices and the right column displays the data.
Earth 1 Moon
Mars 2 Moons
Jupiter 79 Moons
31. (a) Write an SQL statement to create a table named EVENTS with the following specifications: [2+1=3]
Column Name Data Type Key
EventID Numeric Primary Key
EventName Varchar(40)
EventDate Date
Location Varchar(30)
Participants Numeric
(b) Write an SQL query to insert the following data in EVENTS table:
201, ‘Technology Conference 2024’, ‘2024-11-30’, ‘New York’, 500
32. Consider the following tables: [3]

Table 1:

PATIENT, which stores Patient ID (P_ID), Patient Name (P_NAME), Age (AGE) and Gender (GENDER).

Table 2:

MEDICATION, which stores Patient ID (P_ID), Medication Name (MED_NAME), Dosage (DOSAGE).

Note: Attribute names are written within brackets.
Table: PATIENT
P_ID P_NAME AGE GENDER
P1001 Vikas Suri 30 Male
P1102 Rachit Mehra 35 Male
P1103 Shivani Gupta 40 Female
P1008 Jyoti Chawla 60 Female
P1009 Avyaan Grover 23 Male

Table: MEDICATION
P_ID MED_NAME DOSAGE
P1001 Aspirin 100 mg
P1102 Crocin 650 mg
P1103 Levolin 0.63 mg
P1008 Metformin 500 mg
P1009 Amoxicillin 250 mg
Write appropriate SQL queries for the following:
(a) Display the list of female patients who are above the age of 40.
(b) Display patient names along with the medication they are prescribed.
(c) Display the maximum and minimum dosage of medication.
Or

A.46 Informatics Practices with Python–XII


Consider the following tables:

Table 1:

SUPPLIER, which stores Supplier_ID, Supplier_Name, Contact_Number. The table displays basic
information of the suppliers.

Table 2:

INVENTORY, which stores Product_ID, Supplier_ID, Product_Name, Stock_Quantity. The table displays
the stock of the products.
Table: SUPPLIER
Supplier_ID Supplier_Name Contact_Number
S001 Neon Pvt. Ltd. 9891567854
S002 Invent Ltd. 8800764521
S003 Tech Supplies 9811506118
S004 Mega Traders 8370899011

Table: INVENTORY
Product_ID Supplier_ID Product_Name Stock_Quantity
PD1001 S001 Laptop 50
PD1002 S002 Smartphone 200
PD1003 S003 Headphones 100
PD1004 S004 Laptop 30
PD1005 S001 Smartphone 150
Write appropriate SQL queries for the following:
(a) Display the total stock quantity for each product.
(b) List all products supplied by ‘Neon Pvt. Ltd.’ in lowercase.
(c) Display the product name along with the contact number of the supplier.

Section D (2 × 4 = 8 Marks)
33. Sarika, a data analyst, is creating a report to visualize the sales performance of four products in the last
quarter. The sales data (in thousands) is as follows: [4]
Product Sales (in thousands)
Product A 50
Product B 75
Product C 100
Product D 60

Help Sarika complete the following Python code to generate the given bar chart:

Appendices A.47
import __________ as plt # Statement 1
products = ['Product A', 'Product B', 'Product C', 'Product D']
sales = [50, 75, 100, 60]
[Link](products, __________, color='green', label='Sales') # Statement 2
[Link]('Products')
[Link]('__________') # Statement 3
[Link]()
[Link]('__________') # Statement 4
[Link]()
(a) Write a suitable code for the import statement in the blank space against Statement 1.
(b) Refer to the given graph and fill in the blank against Statement 2 with a suitable Python code.
(c) Fill in the blank against Statement 3 with a suitable label for the y-axis.
(d) Refer to the given graph and fill in the blank in Statement 4 with a suitable Chart Title.
34. A sports academy maintains a database to track the performance of its players. The database includes a
table named PLAYER whose column (attribute) names are mentioned below: [4]

PLAYERID: Shows the unique identifier for each player

NAME: Indicates the name of the player

SPORTS: Specifies the sports played by the player

AGE: Indicates the age of the player

SCORE: Lists the total score achieved by the player

Table: PLAYER
PLAYERID NAME SPORTS AGE SCORE
P2001 Lavanya Cricket 20 1500
P2002 Shobit Badminton 22 1800
P2003 Pankaj Tennis 25 2300
P2004 Rehansh Cricket 19 1200
P2005 Geetanjali Football 23 1900

(a)
Write an SQL query to display the names of all the players in uppercase.
(b)
Write an SQL query to find the youngest player in the database.
(c)
Write an SQL query to display the total score of players for each sport.
(d)
Write an SQL query to display player names and scores, sorted in descending order of scores.
Or
Aditi, a librarian, has developed a database to manage books in a library. The database includes a table
named LIBRARY_BOOKS with column (attribute) names as mentioned below:

BOOK_ID: Shows the unique code for each book

TITLE: Specifies title of the book

AUTHOR: Specifies author’s name

COPIES: Indicates the number of copies available

PUB_DATE: Specifies publication date of the book

Table: LIBRARY_BOOKS
BOOK_ID TITLE AUTHOR COPIES PUB_DATE
B001 The Alchemist Paulo Coelho 150 2005-06-15
B002 To Kill a Mockingbird Harper Lee 50 1960-07-11
B003 The Great Gatsby F. Scott Fitzgerald 100 1925-04-10
B004 1984 George Orwell 200 1949-06-08
B005 Pride and Prejudice Jane Austen 75 1813-01-28

A.48 Informatics Practices with Python–XII


Write the output of the following SQL queries:
(a) SELECT LENGTH(TITLE) FROM LIBRARY_BOOKS WHERE COPIES > 100;
(b) SELECT TITLE FROM LIBRARY_BOOKS WHERE MONTH(PUB_DATE) = 6;
(c) SELECT TITLE, BOOK_ID FROM LIBRARY_BOOKS WHERE COPIES BETWEEN 50 AND 150;
(d) SELECT MAX(PUB_DATE) FROM LIBRARY_BOOKS;

Section E (3 × 5 = 15 Marks)
35. The Institute of Brilliance is setting up a new campus in Pune with an academic block, an administrative
block, a library block and a computer lab block. Additionally, a regional office in Nagpur will be connected
to the Pune campus for better communication and data sharing. As a network expert, you have to propose
solutions for the given queries. [5]

PUNE NAGPUR

Academic Administrative

Library Computer Lab

The shortest distances between the blocks/offices are as follows:


ACADEMIC TO ADMINISTRATIVE 50 m
ACADEMIC TO LIBRARY 70 m
ACADEMIC TO LAB 100 m
ADMINISTRATIVE TO LIBRARY 60 m
PUNE CAMPUS TO NAGPUR 800 m

The number of computers in each block/office is as follows:


ACADEMIC BUILDING 120
ADMINISTRATIVE BUILDING 50
LIBRARY 30
COMPUTER LAB 150
NAGPUR REGIONAL OFFICE 40
(a) Suggest the most suitable block in the Pune campus to install the server. Give a reason to justify your
answer.
(b) Draw a suitable cable layout of wired network connectivity between the blocks in the Pune campus.
(c) Which networking device would you suggest the college to purchase to interconnect all the computers
within a block in Pune campus?
(d) The company is considering establishing a network connection between its Pune campus office and
Nagpur regional office. Which type of network—LAN, MAN or WAN—will be created? Justify your
answer.
(e) The college plans to develop an online portal where students can log in to check attendance, view
assignments and register for exams. Would you recommend a static or dynamic website for this
purpose? Justify your recommendation.

Appendices A.49
36. Consider the dataframe df shown below. [5]

StudentID Name Class Marks Age


0 1 Ankit 12 85 17
1 2 Priyanka 11 89 16
2 3 Rahul 12 92 18
3 4 Riddhima 10 78 15
4 5 Jayshree 11 88 16
Write Python statements for the dataframe df to:
(a) Print the first three rows of the dataframe df.
(b) Display the names of all the students in the dataframe.
(c) Add a new column, ‘Sports’, and set its value as ‘Basketball’ for all students.
(d) Retrieve and display ‘Name’ and ‘Marks’ columns for students in Class 11.
(e) Rename the column name ‘Marks’ to ‘Percentage’.
37. Write a suitable SQL query for the following: [5]
(a) To calculate the total price from price column (attribute) in Orders table.
(b) To display the first five characters from product_code column (attribute) in Products table.
(c) To display email column (attribute) from Customers table after converting all characters to
lowercase.
(d) To find the minimum value in marks column (attribute) of Students table.
(e) To count the total number of unique order_ids in OrderDetails table.
Or
Write suitable SQL query for the following:
(a) Round off the value 456.789 to one decimal place.
(b) Calculate the remainder when 144 is divided by 12.
(c) Display the number of characters in the string ‘InformationEncrypted’.
(d) Display the last 7 characters from the string ‘Technology Space’.
(e) Display the data from ‘address’ column (attribute) in ‘Customers’ table after removing the trailing
spaces.

A.50 Informatics Practices with Python–XII

Common questions

Powered by AI

In star topology, all network devices connect to a central hub or switch, which acts as the communication conduit for data transmission. While this configuration simplifies troubleshooting and expansions—since any single device issue doesn't affect the whole network—it also poses a single point of failure risk. If the central hub fails, the entire network becomes inoperative, impacting reliability adversely. Despite this, star topology supports high performance and is easy to manage when maintained with a reliable central network device.

In Python's Pandas library, the drop method is used to remove specified labels from rows or columns in a dataframe, with syntax like `df.drop(columns=['column_name'])`, focusing mainly on data analysis and manipulation within an application. Conversely, SQL's DROP command is employed to remove entire database entities such as tables, databases, or columns, with far-reaching implications as it deletes data structures permanently. It's used in scenarios requiring structural database changes. Therefore, while Pandas' drop is temporary and reversible, SQL's DROP is permanent, each serving distinct roles in data management.

A college should opt for a dynamic website for managing student portals because dynamic websites are designed to render different content for different visitors from the same source code, enabling functionalities like user authentication, personalized student dashboards, and updated academic records. It allows for real-time interaction and content manipulation, essential for activities such as checking attendance, accessing assignments, and registering for exams, thereby providing a more interactive and personalized user experience than a static website, which only offers pre-coded, non-interactive web pages.

A website is a collection of web pages that are interconnected and accessible under a common domain name, functioning as a single entity for delivering information or services on the internet. A web page, however, is a singular document on the web that can contain text, media, and interactive elements, contributing to the information or functionalities of the website it belongs to. This structural difference means a website serves broader functionalities by organizing and displaying multiple web pages, catering to diverse user needs, whereas a web page deals with delivering specific content or resources.

Imposing constraints on the PRIMARY KEY in an SQL database schema is crucial for ensuring data integrity. A PRIMARY KEY uniquely identifies each record in a table, ensuring that each entry is distinct and traceable. By preventing duplicate entries and enabling efficient indexing, it maintains data accuracy, avoids redundancy, and enhances query performance. Moreover, PRIMARY KEY constraints facilitate relational database design by enforcing parent-child relationships among tables, thus upholding the relational model's integrity.

The HAVING clause in SQL is used to filter records after the grouping process has taken place. It allows you to specify conditions for which the grouped records are displayed, thus filtering groups based on aggregate functions. This occurs after the data has been organized by the GROUP BY clause.

Cyber ethics refers to the code of responsible behavior while using the internet, including respecting others' privacy, data integrity, and the legality of digital interactions. It is crucial in today's digital age due to the increasing prevalence of online activities and interactions, where ethical guidelines help safeguard against issues such as cyberbullying, data breaches, and misinformation, fostering a safe and respectful digital environment.

Effective e-waste management strategies include comprehensive recycling processes that safely extract valuable and hazardous materials, extending the lifecycle of electronic devices through repair and refurbishing, implementing producer responsibility programs where manufacturers are accountable for their products' e-waste, and raising public awareness about e-waste disposal and recycling. Sustainable e-waste management practices ensure the conservation of resources, reduction of environmental pollution, and the protection of human health, thus securing an improved future.

Improper disposal of e-waste, including old printers, can release toxic substances like lead, mercury, cadmium, and polybrominated flame retardants into the soil and water, posing significant environmental and health risks. To mitigate these risks, it's recommended to recycle e-waste through authorized recyclers who dispose of hazardous materials responsibly or to repurpose parts for other uses, thereby reducing environmental harm and conserving resources for future generations.

CHAR is a fixed-length character data type that pads extra spaces for shorter strings to match the defined length, which conserves space but may lead to wasted space if strings are shorter. For example, CHAR(5) will use 5 bytes for storing 'abc' ('abc '). VARCHAR, on the other hand, is a variable-length data type that only uses as much space as needed, ideal for varying lengths of text. For instance, VARCHAR(5) will store 'abc' using only 3 bytes, plus a byte to represent the string length.

You might also like