FIRST PREBOARD EXAMINATION
CLASS XII SESSION: 2024-25
INFORMATICS PRACTICES (065)
SET-I
Time allowed: 3 Hours
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.
| Q No. | Section-A (21 × 1 = 21 Marks) | Marks | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 |
State whether the following statement is True or False: iloc is used to extract a specific portion from a Pandas Dataframe through label based indexing |
1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 |
Which of the following provides a correct order of clauses used in SQL? a) Where, Order By, Group By, Having b) Group By, Order By, Having c) Group By, Where d) Where, Group By, Order By |
1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 |
Identify the networking device responsible for broadcasting data to every node in a network
(A) Modem (B) Hub (C) Repeater (D) Router
|
1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 |
Identify the SQL commands used to add, modify tuples of a relation (table) in a relational database.
(A) CREATE, UPDATE
(B) INSERT, UPDATE (C) ALTER, UPDATE (D) INSERT, ALTER |
1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 |
Cookies refer to:
(A) Software that has become obsolete
(B) are temporary text files with small pieces of data (C) Viruses that infect computers (D) Permanent text files stored in your computer |
1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 |
Which of the following Python statements can not be used to select a column ‘age’ from a DataFrame ‘stu’ ?
(A)
stu.loc['age',:](B) stu['age'](C) stu.at[:,'age'])(D) stu.loc[:,'age']
|
1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 |
By default, the linestyle attribute of a plot () of Matplotlib draws _____ type of line.
(A) Solid (B) dashed
(B) Dash-dot (D) dotted |
1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 |
What will be the output of the query? SELECT * FROM products WHERE product_name LIKE ‘%App%’;
(A) Details of all products whose names start with ‘App’
(B) Details of all products whose names end with ‘App’ (C) Names of all products whose names contain ‘App’ (D) Names of all products whose names end with ‘App’ |
1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 |
Which of the following Python statements is used to write data to a CSV file from a Pandas DataFrame (Note: pan is an alias for pandas)?
(A)
pan.save_csv('filename.csv')(B) pan.from_csv('filename.csv')(C) pan.to_csv('filename.csv')(D) pan.tocsv('filename.csv')
|
1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 |
What is open source software?
(A) It’s Source code is not available but re-distribution is allowed
(B) It’s source code is available with restrictions. (C) It’s source code is available and re-distribution is allowed (D) None of these |
1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 |
Consider TableA
SELECT COUNT(*), COUNT(DISTINCT NAME), COUNT(NAME) FROM TABLEA;
a) 4,5,3 b) 5,4,3 c) 5,5,3 d) 5,3,4
|
1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 |
Identify the network topology which connects devices in a hierarchical manner having root node and branches
(A) Bus (B) Tree (C) Mesh (D) Star
|
1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 |
Riya has written the following code, but she is not able to identify the result of the same.
import pandas as pd s1=pd.Series([13,36,19,42],index=['a','b','c','4']) print(s1[s1>=30])Help her by selecting an appropriate option from the following
|
1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 |
Which amongst from the following is used to identify a resource by its location or by its name or both?
a) Universal Resource Locator
b) Universal Resource Identifier c) Uniform Resemble Locator d) Uniform Resource Locator |
1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 |
While creating a Dataframe using a nested dictionary, the keys of the outer dictionary become:
(A) Values of the Dataframe (C) Indices of the Dataframe
(B) Row labels of the Dataframe (D) Column labels of the DF |
1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 |
Match the following SQL functions/clauses with their descriptions:
(A) P-2, Q-4, R-3, S-1
(B) P-2, Q-4, R-1, S-3 (C) P-3, Q-4, R-1, S-2 (D) P-4, Q-2, R-1, S-3 |
1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 |
Fill in the Blanks: Boolean indexing in Pandas DataFrame can be used for _______
(A) Creating a new DataFrame
(B) Sorting data based on index labels (C) Joining data using labels (D) Filtering data based on condition |
1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 |
Which Matplotlib plot is best suited to represent categorical data using rectangular bars
(A) Bar chart (C) Horizontal bar chart
(B) Histogram (D) Both a and b |
1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 |
Which type of network covers a large geographical area spaaning various countries and continents
(A) PAN (B) MAN (C) LAN (D) WAN
|
1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Q-20 and Q-21 are Assertion (A) and Reason (R) Type questions. Choose the 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): The output of addition of two series will be NaN , if one of the elements or both have no values. Reason (R): While performing mathematical operations on Series, by default all missing values are filled in with 0. |
1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 |
Assertion (A): The count(*) will yield a single value while round() will yield number of values equal to the cardinality of a table. Reason (R): The count(*) is a multiple row function and round() is a single row function. |
1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q No. | Section-B (7 × 2 = 14 Marks) | Mks | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 |
(A) What is pandas library of Python? What is it’s significance?
OR
(B) What is the use of ‘import’ keyword in Python? Mention one use for each of the following attributes of DataFrame
(i) T (ii) size
|
2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 |
Raj has created a group on social media to share and discuss about academics. But his friend Deepak is posting derogatory and threatening remarks in the group. i) What is the term used for the task done by Deepak? ii) Any act by Indian Government imposed to protect and safeguard issues like this? Explain in detail. |
2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 |
Consider the string: “Digital Technology”. Write suitable SQL queries for the following:
I. To get the position of word “Tech” of the string.
II. Remove the leading and trailing space of the given string. |
2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 |
(A) How static web pages and different from dynamic web pages ?
OR
(B) Explain the concept of plug-ins and give one example.
|
2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 |
Based on the table ‘Product’ given below, Identify candidate key and primary key
|
2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | Mention two health concerns associated with excessive use of mobile and computers. | 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 |
(A)Ashi is writing a Python program to create a DataFrame using a nested list. But, her code contains some mistakes. Identify the errors, rewrite the correct code, and underline the corrections made.
Import pandas as PDR L1 = [10, “C++”, 500] L2 = [11, “Java”, 1000] L3 = [12, “Python”, 800] L = [L1,L2,L3] df = pandas.dataframe( L, [101,201,301,401]) print(df) OR
(B)Complete the given Python code to get the required output (ignore the dtype attribute) asOutput: XIA1 PCM XIC1 Commerce XIB1 PCBCode: ________ as _____ D = _____ ‘XIA1’: ‘PCM’,’XIC1’:’Commerce’,’XIB1’:’PCB’ ______ L = [1,2,3] S = pd.Series(___________ , index=__________) print(S) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q No | Section-C (4 x 3 = 12 Marks) | Mks | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 |
Aryan wants to replace his old music system by new. He throws his old music system in garbage.
I. How this way of disposal of e-waste is hazardous for health of human.
II. Suggest one suitable way to dispose of such waste products. III. Give two examples of e-waste |
3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 |
(A)Write a Python program to create the following DataFrame using a dictionary of list
OR
(B)Write a Python Program to create a Pandas Series as shown below using a dictionary.Also display Series alternate rows starting from 1st row.Note that the left column indicates the indices and the right column displays the data.
|
3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 |
(i)Write an SQL statement to create a table named ORDERS, with the following specifications :
1004, “Aadya”, “Camera”, 4, 6000 |
3 (2+1) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 |
(A)Consider the following tables: Table 1: FACULTY which stores FACULTY ID (F_ID), FACULTY NAME (FNAME), HireDate(Hire_Date), SALARY(SALARY), DEPARTMENT(DEPARTMENT) Table 2: COURSES which stores Course ID (C_ID), FACULTY ID (F_ID), COURSE NAME (CNAME), FEES(FEES), ( for various faculty). Note: Attribute names are written within brackets. Table: FACULTY
I. Display the department wise total salary, average salary.
II. Display size of FName, first 3 characters of FName of faculty table. III. Display the F_id, faculty name along with their corresponding course name OR
B) Consider the following tables:Table 1: FEE which stores RECNO, CID, AMOUNT. The table displays basic information of the fee deposited by candidate. Table 2: CANDIDATE, which stores CID, NAME and CLASS. The table displays the name , candidate id and class. Table: FEE
I. Display the class wise total number of candidates.
II. Display the cid, name of candidates along with amount paid. III. Display the name and recno in ascending order of name. |
3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q No | Section-D (2 x 4 = 8 Marks) | Mks | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 |
Rishi has to display the result of students in different years. He has to create a line chart, representing the year, number of students secured above 90%
Also consider following points-
|
4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 |
Shriya, who works as a database developer, has developed a database for a Medicine Shop. This database includes a table CLUB whose column (attribute) names are mentioned below: CID- CUSTOMER ID CNAME – NAME OF CUSTOMER AGE- AGE OF CUSTOMER GENDER- GENDER OF CUSTOMER SPORTS-SPORTS PLAYED PAY- PAY OF SPORTS DOAPP- DATE OF APPLICATION
I. Write SQL query to display name of customers and month of doapp.
II. Write SQL query to display the counting of Female who play chess. III. Write SQL query to display the 4 characters from 2nd position of sports. IV. Write SQL query to display the details of club table in descending order of pay whose sports is cricket. OR
Riya has created a database for a electricity department. The database includes a table named PERSON whose column (attribute) names areP_ID- PERSON ID NAME – NAME OF PERSON DESIG- DESIGNATION OF PERSON SALARY- SALARY OF PERSON ALLOWANCE-ALLOWANCE OF PERSON
I. Select LENGTH(NAME) from PERSON where IS NOT NULL;
II. Select NAME from PERSON where DESIG not in(“CLERK”,”MANAGER”); III. Select avg( salary) from PERSON where NAME like “%h%”; IV. Select min(salary), max(salary) from PERSON; |
4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q No. | Section-E (3 × 5 = 15 Marks) | Mks | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 |
Soft Infotech Software Development Company has set up its new centre at Ahmedabad for its office and web based activities. It has 4 blocks of building named Design, HR, Development, R & D. It has following no. computers in each block.
ii. Which type of network will be formed when all the blocks of Ahmedabad Centre are connected. iii. The company is planning to link all the blocks through a secure and high speed wired medium. Suggest a way to connect all the blocks. iv. Suggest the most suitable block to place the following devices: a) Hub/Switch b) Modem v) Company is planning to purchase a new hardware to protect the network from unauthorised access from outside. Suggest a device. |
5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 |
Consider the DataFrame ‘countries’ shown below.
I. Display the first two rows and last column of the DataFrame countries.
II. Display Capital, Population of all the countries. III. Remove the columns country and capital IV. Display the data of the ‘Population’ column from indexes 1 to 3 (both included) V. Rename the row 3 as ‘Three’ and column ‘Capital’ as ‘Cap’ |
5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 |
(A)Write suitable SQL query for the following:
I. To display the total salary from the ‘PAY’ column (attribute) in the Emp table of each department (‘dept’ column) separately.
II. To display the first five characters of the PANNO merged with last three charcters of ‘NAME’ in lowercase from the ‘Customer’ table. III. To display the Title of all books in uppercase from the column ‘Title’ in the ‘Books’ table, after eliminating any leading and trailing spaces. IV. To display the joining year of all teachers from ‘TEACHER’ table (column name is doj in ‘yyyy-mm-dd’ format) V. To display the position of ‘A’ and number of characters in the FNAME column of ‘FURNITURE’ table OR
(B)Predict the output of the following SQL queries:
i.
SELECT ROUND(518723.6754,-2)+MOD(154,5) ;ii. SELECT MONTHNAME('2012-07-04'), DAY('2012-07-04');iii. SELECT LENGTH(TRIM(' New Delhi '));iv. SELECT SUBSTRING('MYSQL FUNCTIONS',-9,3);v. SELECT UCASE(RIGHT('Half Yearly Exam',4)) ;
|
5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
