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

Python Libraries in Informatics Practices

The document is a question paper for the Pre-Board I Examination 2024-25 for Class XII in Informatics Practices. It contains 37 compulsory questions divided into five sections, covering various topics including Python programming, SQL queries, and data handling with Pandas. The exam is structured to assess students' knowledge and skills in Informatics Practices, with a total of 70 marks available.
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)
18 views8 pages

Python Libraries in Informatics Practices

The document is a question paper for the Pre-Board I Examination 2024-25 for Class XII in Informatics Practices. It contains 37 compulsory questions divided into five sections, covering various topics including Python programming, SQL queries, and data handling with Pandas. The exam is structured to assess students' knowledge and skills in Informatics Practices, with a total of 70 marks available.
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

Kendriya Vidyalaya Sangathan, Varanasi Region

Pre-Board I Examination 2024-25


Class XII Max. Marks -70
Subject – Informatics Practices (065) Max. Time - 03 Hours
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.

1. State whether the following statement is True or False: 1


Panda Series are immutable as size of a series can‟t be changed.
2. Python command to display the 3rd, 4th and 5th columns from the 6th to 9th rows of a 1
dataframe DF :
a. [Link][6:9, 3:5] b. [Link][6:10, 3:6]
c. [Link][6:10, 3:6] d. [Link][6:9, 3:5]
3. The correct statement to read from a CSV file names [Link] in a dataframe DF is : 1
a. DF.read_csv(“[Link]”) b. cfile.read_csv(DF)
c. DF = [Link](“[Link]”) d. DF =
pandas.read_csv(“[Link]”)
4. To get bottom five rows of a data frame, you may use function: 1
a. Tail(5) b. bottom(5)
c. last(5) d. tail()
5. A social science teacher wants to use a pandas series to teach about Indian historical 1
monuments and its states. The series should have the monument names as values and
state names as indexes which are stored in the given dictionary, as shown in the code.
Choose the statement which will create the series:
import pandas as pd
Monument={ „Delhi‟: „Qutub Minar‟,
„Maharastra‟: „Gateway of India‟,
„Delhi‟: „Red Fort‟,
„Agra‟: „Taj Mahal‟}
a. S = [Link](Monument, index = State)
b. S = [Link](Monument)
c. S = [Link](Monument, index = State)
d. S = [Link](Monument, State)
6. _____________ refers to have an index with True or False index values. 1
a. Boolean Reduction b. Boolean Indexing
c. Boolean Dataframe d. Boolean Iteration
7. Which Matplotlib plot is best suited to represent changes in data over time? 1
a. Bar plot b. Histogram
c. Line plot d. Histogram & Bar plot
8. What is the minimum number of arguments required for plot() function in 1
matplotlib?
a. 1 b. 2 c. 3 d. 4
9. Which SQL clause is used to filter records? 1
a. WHERE b. ORDER BY
c. GROUP BY d. HAVING
10. Which SQL statement do we use to find out the total number of records present in the 1
table ORDERS?
a. SELECT TOTAL(*) FROM ORDERS;
b. SELECT COUNT(*) FROM ORDERS;
c. SELECT FIND(*) FROM ORDERS;
d. SELECT SUM(*) FROM ORDERS;
11. Which of the following is true about the HAVING clause? 1
a. Similar to the WHERE clause but is used for columns rather than groups.
b. Similar to WHERE clause but is used for rows rather than columns.
c. Similar to WHERE clause but is used for groups rather than rows.
d. Acts exactly like a WHERE clause.
12. Which SQL clause is used to specify a condition for aggregate functions like COUNT? 1
a. WHERE b. GROUP BY
c. HAVING d. ORDER BY
13. Match the following SQL functions/clauses with their descriptions: 1
SQL Function Description
P. MID 1. ensures that all values in a column are different
Q. INSTR 2. fetch unique records and eliminates the duplicate records
in the table
R. UNIQUE 3. extracts a substring from a string
S. DISTINCT 4. returns the position of the first occurrence of a string in
another string

a. P-3, Q-4, R-2, S-1 b. P-3, Q-4, R-1, S-2


c. P-4, Q-3, R-2, S-1 d. P-4, Q-3, R-1, S-2
14. Which of the following is not the Networking Devices? 1
a. Gateways b. Linux
c. Routers d. Firewalls
15. Fill in the blank: _________is a communication methodology designed to deliver both 1
voice and multimedia communications over Internet protocol.
a. VoIP b. SMTP c. PPP d. HTTP
16. Mr. Rafique is a small businessman who runs Hardware store. He has been experiencing 1
problems with his small accounting department, which he depends on to provide sales
reports. Mr. Rafique wants to share information between his 4 computer stations and have
a central printing area. What type of network would you recommend to Mr. Rafique?
a. PAN b. MAN c. WAN d. LAN
17. The legal and regulatory aspects of the internet refer to..................... 1
a. Cyber Space b. Cyber crime
c. Criminal law d. IT act
18. IPR stands for : 1
a. International Property Right b. Intellectual Power Right
c. Industrial Property Right d. Intellectual Property Right
19. Following are the impact of e-waste on the environment. Choose the odd one out. 1
a. Soil Pollution b. Water Pollution
c. Air Pollution d. Sound Pollution
Q-20 and Q-21 are Assertion (A) and Reason (R) type questions. Choose correct option as:
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
20. Assertion (A): To make a Histogram with Matplotlib, we can use the [Link]() function. 1
Reasoning (R): The bin parameter is compulsory to create histogram.
21. Assertion (A): In SQL, INSERT INTO is a Data Definition Language (DDL) Command. 1
Reason (R): DDL commands are used to create, modify, or remove database structures,
such as tables.
22. What is a Series in Python Pandas? Also, give a suitable example to support your answer. 2
-- OR --
What does the term 'library' signify in Python? Mention one use for each of the following
libraries:
 Pandas
 Matplotlib
23. What will be the output of the given code? 2
import pandas as pd
s = [Link]([20, 22, 35, 24, 13],
index=['akram','brijesh','charu','deepika','era'])
print(s[s > 22])
24. Define Alternate key in context of Relational Database. How it is different from Primary 2
Key?
25. Consider the date: "2024-11-01". Write suitable SQL queries for the following: 2
a. To extract and display the date (01) from the given date.
b. To extract and display day of the week (Friday) for the given date (as 1 st of November
2024 falls on Friday).
26. Rashid thought “WWW” and “Internet” are synonym i.e. they meant same and can be 2
used interchangeably. But the teacher said that they are not same. Help him to understand
the meaning of both the terms with the help of suitable example of each.
-- OR --
Briefly explain the basic concepts of a web server and web hosting.
27. Match the following: 2
Column A Column B
Plagiarism Fakers, by offering special rewards or money prize asked for
personal information, such as bank account information
Hacking Copy and paste information from the Internet into your report
and then organize it
Credit card fraud The trail that is created when a person uses the Internet.
Digital Foot Print Breaking into computers to read private emails and other files

28. Sumit got good marks in all the subjects. His father gifted him a laptop. He would like to 2
make Sumit aware of health hazards associated with inappropriate and excessive use of
laptop. Help his father to list the points which he should discuss with Sumit.
29. Write a Python program to create the following DataFrame using a list of dictionaries. 3
Names Marks Trials Passed
Sanya 95 2 Yes
Krish 70 3 No
Rishav 96.5 1 Yes
Kriti 92 1 Yes
-- 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.
India Delhi
Russia Moscow
Australia Canberra
Canada Ottawa

30. Consider the following tables Employees and EmpSalary and answer the questions that 3
follows:
Table : Employees
Empid Firstname Lastname Address City
010 Ravi Kumar Raj nagar Ghaziabad
105 Harry Waltor Gandhi nagar Ghaziabad
152 Sam Tones 33 Elm St. Paris
215 Sarah Ackerman 440 U.S. 110 Upton
244 Manila Sengupta 24 Friends street New Delhi
300 Robert Samuel 9 Fifth Cross Washington
335 Ritu Tondon Shastri Nagar Ghaziabad
400 Rachel Lee 121 Harrison St. New York
441 Peter Thompson 11 Red Road Paris

Table : EmpSalary
Empid Salary Designation Grade
010 75000 Manager I
105 65000 Manager II
152 80000 Director I
215 75000 Manager II
244 50000 Clerk II
300 45000 Clerk III
335 40000 Clerk III
400 32000 Salesman II
441 28000 salesman III

Write appropriate SQL queries for the following:


a. Display the designation - wise total salary.
b. Display the names of all the employees in uppercase living in Ghaziabad.
c. Display the first name of employee along with their corresponding Salary grades.
-- OR --
Write appropriate SQL queries for the following:.
a. Display designation - wise average Salary.
b. List all designations in the decreasing order of Salary.
c. Display first name, last name of employees along with their designation.

31. a. Write SQL query to create a table „Stock‟ with the following structure: 2
Column name Data Type Size Constraints +
ItemNo Integer 4 Primary Key 1
ItemName Varchar 20 Can‟t be null =
RecordDate Date
3
QtyInHand Integer
b. Write SQL Query to insert the following data in the „Stock‟ Table:
123, C3Z Intel Mother Board, 2024-11-20, 15
32. Ayesha's family is replacing their old computer with a new one. They decide to sell the 3
old computer to the local kabadiwala.
a. Explain any one potential environmental hazard associated with improper e-waste
disposal.
b. Suggest one responsible way to Ayesha's family for proper disposal of their old
computer.
c. Describe the importance of recycling in e-waste management.
33. During a practical exam, a student Shefali has to fill in the blanks in a Python program 4
that generates a bar chart. This bar chart represents the Prabhu International Educational
Society students‟ exam performance in rural areas.
Help Shefali to complete the code.
import as plt #Statement 1
year = [2015, 2016, 2017, 2018, 2019]
values = [80, 85, 95, 90, 75]
[Link](year, , color ='blue', width = 0.4) #Statement 2
[Link]("Pass percentage in Rural School")
plt. ("Pass Percentage") #Statement 3
[Link]( ) #Statement 4
[Link]()
[Link]('pass_per.png')
a. Write the suitable code for the import statement in the blank space in the line marked
as Statement-1.
b. Refer to the graph shown above and fill in the blank in Statement-2 with suitable
Python code.
c. Fill in the blank in Statement-3 with the name of the function to set the label on the y-
axis.
d. Refer the graph shown above and fill the blank in Statement-4 with suitable Chart
Title.
34. Consider the following table „GRADUATE‟. Write SQL commands for the following: 4
TABLE: GRADUATE
[Link] ST_NAME STIPEND SUBJECT AVERAGE DIV
1 KARAN 400 PHYSICS 68 III
2 DIWAKAR 450 COMPUTER SC 68 I
3 DIVYA 300 CHEMISTRY 62 I
4 REKHA 350 PHYSICS 63 II
5 ARJUN 500 MATHS 70 I
6 SABINA 400 CEHMISTRY 55 II
7 JOHN 250 PHYSICS 64 I
8 ROBERT 450 MATHS 68 I
9 RUBINA 500 COMPUTER SC 62 I
10 VIKAS 400 MATHS 57 II

a. Write SQL query to display the name of subject in lowercase.


b. Write SQL query to display the highest stipend among the students.
c. Write SQL query to display the number of characters in the name of each student.
d. Write SQL query to display the Student Name and Stipend sorted by Average in
descending order.
-- OR --
Write the output of the following SQL commands.
a. SELECT RIGHT(„CBSE/2017/EN/11‟, 2);
b. SELECT INSTR(“CORPORATE FLOOR”, ”OR”);
c. SELECT ROUND(7234.3867, –2);
d. SELECT LENGTH(„WELCOME‟) + 20;
35. Consider the given DataFrame „Stock’ of movies based on popular books by same name: 5
Name Price Ratings
0 Nancy Drew 150 5
1 Hardy boys 180 7
2 Diary of a wimpy kid 225 4
3 Harry Potter 500 8
Write suitable Python statements for the following:
a. Add a column called Release_Year with the following data: [1930,1927,2010,2002].
b. Add a new book named „The Secret' having price 800 with ratings as 6 and year of
release as 2006.
c. Remove the column Price.
d. Display names of all the movies.
e. Rename the column name 'Name' to „Movie_Name‟.
36. Write suitable SQL query for the following: 5
a. To display the position of first occurrence of string „LA‟ in the string
„MALAYALAM‟.
b. To round off the value 28.2781 to two decimal place.
c. To display the month name from the „hiredate‟ of „employee‟ table.
d. To remove all the leading and trailing spaces from a column „title‟ of the table
„Books‟.
e. To determine the count of rows in the „Suppliers‟ table.
-- OR --
Write suitable SQL query for the following:
a. To round off the value of 2.718281828459045 to four decimal places.
b. To display the remainder of 100 divided by 19.
c. To display the word 'NewDelhi' in capital letters.
d. To display the last 5 characters from the word 'Info Pract'.
e. To display details „Vidya‟ from the text „Kendriya Vidyalaya‟.

37. Daksh Planners is an event planning organization. It is planning to set up its India campus 5
in Mumbai with its head office in Delhi. The Mumbai campus will have four
blocks/buildings - ADMIN, FOOD, MEDIA, and DECORATORS. You, as a network
expert, need to suggest the best network-related solutions for them to resolve the
issues/problems mentioned in points (I) to (V), keeping in mind the distances between
various blocks/buildings and other given parameters.
Block to Block distances (in Mtrs.)
From To Distance
ADMIN FOOD 42 m
ADMIN MEDIA 96 m
ADMIN DECORATORS 48 m
FOOD MEDIA 58 m
FOOD DECORATORS 46 m
MEDIA DECORATORS 42 m
Distance of Delhi Head Office from Mumbai Campus = 1500 km
Number of computers in each of the blocks/Center is as follows:
ADMIN 30
FOOD 18
MEDIA 25
DECORATORS 20
DELHI HEAD OFFICE 18
a. Suggest the most appropriate location of the server inside the MUMBAI campus.
Justify your choice.
b. Which hardware device will you suggest to connect all the computers within each
building?
c. Draw the cable layout to efficiently connect various buildings within the MUMBAI
campus. Which cable would you suggest for the most efficient data transfer over the
network?
d. Is there a requirement of a repeater in the given cable layout? Why/ Why not?
e. What type of network (PAN, LAN, MAN, or WAN) will be set up among the
computers connected in the MUMBAI campus?

**** ****

You might also like