CBSE CLASS XII INFORMATICS PRACTICES SAMPLE QUESTION PAPER 3

CBSE BOARD INFORMATICS PRACTICES SAMPLE PAPER-3 TIME 3hrs                                                                 CLASS-XII                                                             MM 70
SECTION-A(1X21=21)
Q1State whether true or false: Mysql is not a case-sensitive language. 
Q2What will be the result of following SQL query: SELECT ROUND(2364.456, -1);
(A) 2364          (B) 2365                       (C) 2360                       (D) 2370
 1 
Q3Unauthorized use of someone else’s work is called:
(A) Plagiarism             (B) Licensing                (C) Cybercrime            (D) Netiquette
 1 
Q4In SQL, which clause is used to filter the results of aggregate functions?
(A) GROUP BY              (B) HAVING                  (C) WHERE                  (D) ORDER BY
 1 
Q5In which device is data sent to all the connected computers, regardless of the intended recipient?
(A) Hub                        (B) Switch                    (C) Router                    (D) Repeater
 1 
Q6For mathematical operations between two Series with different indexes, the result contains:
(A) Only matching indexes                              (B) Union of indexes, with NaN for missing entries
(C) Only the first Series                                   (D) Only non-matching indexes
 1 
Q7Which is an example of cyberbullying?
(A) Posting mean comments online                            (B) Sharing copyrighted music
(C) Creating open source software                             (D) Buying e-books
 1 
Q8What is the result of INSTR(‘KENDRIYA’, ‘D’) in SQL?
(A) 3    (B) 2     (C) 1     (D) 4
 1 
Q9What function reads data from a CSV file into a DataFrame?
(A) pd.read_tab()        (B) pd.load_csv()         (C) pd.read_csv()         (D) pd.csv_import()
 1 
Q10Which of the following scenarios is best served by a static website?
(A) Personal blog with frequent updates                    (B) Online shopping cart
(C) Company information page that rarely changes   (D) Social networking site
 1 
Q11The COUNT(column) function will:
(A) Count all rows, including NULLs                            (B) Count only non-NULL values
(C) Always count only text                                          (D) Count columns with zero
 1 
Q12To select multiple columns ‘A’ and ‘B’ from DataFrame df:
(A) df [ ‘A’, ‘B’]             (B) df.select ([‘A’,’B’])             
(C) df [ [‘A’, ‘B’]]          (D) df.loc [[‘A’, ‘B’]]
 1 
Q13In which type of license is the user generally not allowed to modify or distribute the software?
(A) Free and Open Source       (B) Permissive             (C) Proprietary            (D) Copyleft
 1 
Q14Which declaration allows a value up to 123.45?
(A) FLOAT(5,2)             (B) FLOAT(2,5)             (C) FLOAT(4,3)                         (D) FLOAT(6,4)
 1 
Q15How do you rename the column ‘Name’ to ‘FullName’ in df?
(A) df.rename(columns={‘Name’:’FullName’}, inplace=True) (B) df.change_column(‘Name’, ‘FullName’)   
(C) df[‘FullName’] = df[‘Name’]                          (D) df.set_columns(‘FullName’)
 1 
Q16Which of the following is NOT a web browser?
(A) Google Chrome     (B) Mozilla Firefox       (C) Microsoft Access               (D) Safari
 1 
Q17To replace all occurrences of NaN in df with 0, you use:
(A) df.fillna(0)       (B) df.replace(0, np.nan)     (C) df.dropna(0)           (D) df.replace(np.nan, 0)
 1 
Q18Which function is used to get a quick statistical summary of DataFrame df?
(A) df.head()                (B) df.info()                              (C) df.describe()                      (D) df.tail()
 1 
Q19Identify the query with an incorrect HAVING clause usage:
(A) SELECT city, COUNT(*) FROM Employees GROUP BY city HAVING COUNT(*) > 2;
(B) SELECT department, AVG(salary) FROM Employees GROUP BY department HAVING salary > 50000;
(C) SELECT gender, MIN(age) FROM Students GROUP BY gender HAVING MIN(age) < 15;
(D) SELECT status, COUNT(*) FROM Orders GROUP BY status HAVING COUNT(*) >= 5;
 1 
Choose the correct option for the following Assertion, reason based questions:
(A) Both A and R are true and R is the correct explanation of A
(B) Both A and R are true but R is not the correct explanation of A
(C) A is true but R is false                               
(D) A is false and R is true
 
Q20Assertion (A): A primary key cannot accept NULL values.
Reason (R): The primary key is used to uniquely identify each row in the table.
1 
Q21Assertion (A): Series is not size mutable.
Reason (R): DataFrame is size mutable as well as value mutable.
 1 
SECTION-B (2×7=14) 
Q22Differentiate between Pandas Series and NumPy ndarray with examples.       
OR
Explain any two important attributes of DataFrame with suitable examples.
2 
Q23Fill in the blanks to create a Series from a dictionary so that the output is as follows:
A          5
B          15
C          25
dtype: int64
import pandas as pd
d = {____________}
S = pd.Series(______________ )
print(s)
 2 
Q24Write the output of the following code:
import pandas as pd
data = { ‘Product’: [‘Pen’, ‘Pencil’, ‘Notebook’], ‘Price’: [10, 5, 40], ‘Stock’: [100, 150, 200] }
df = pd.DataFrame(data)
df.rename(columns={‘Stock’: ‘Quantity’}, inplace=True)
df.drop(1, axis=0, inplace=True)
print(df)                                                   
OR
Given the DataFrame df created as:
import pandas as pd
data = {‘Name’: [‘Alice’, ‘Bob’, ‘Charlie’], ‘Age’: [25, 30, 35]}
df = pd.DataFrame(data)
print(df.shape)
print(df.T)
(a) What is the output of print(df.shape)?   
(b) What is the output of print(df.T)?
 2 
Q25Consider the following EMPLOYEE table:
EmpID AadharNumber MobileNumber Name
101 234567890121 9876543210 Ajay
102 123456789012 9876512345 Sunita
103 345678901234 9876598765 Ravi
(a) List all candidate keys for this table.
(b) If EmpID is chosen as the primary key, which attributes become alternate keys?
 2 
Q26Define URL and give one example.                 
OR
You want to organize a virtual meeting with your classmates who live in different cities.
(a) Which Internet application will you use to have voice and video communication?
(b) Name the protocol used by the application for such meetings.
 2 
Q27Ravi shares many personal photos and details on his social media profiles without privacy settings enabled.
(a) What kind of footprint is Ravi creating on the Internet?
(b) Mention one possible negative consequence of such a digital footprint.
 2 
Q28What is plagiarism? Give one example of how a student might commit plagiarism in their school work. 2 
SECTION-C   3X4=12 
Q29Rahul invents a new solar-powered water purifier, designs a unique logo for his business, and writes an original user manual for the product. Classify each item under the correct intellectual property category-copyright, trademark, or patent and explain why protecting each item under its specific intellectual property right is important. 3 
Q30  Employee Department Salary
0 John HR 50000
1 Alice IT 70000
2 Bob Finance 60000
Write a Python program to create the following Pandas DataFrame using a dictionary of lists.
Display the entire DataFrame after creation.  
OR
Write a Python program to create the following Pandas DataFrame using a list of lists objects:  
Author Articles Age
0 Jitender 2 10
21 1 Purnima 211 21 2 Arpit 114 24
 3 
Q31Write SQL commands for the following tasks on a table named Employee: a) Create the Employee table with columns: emp_id (integer, primary key), name (varchar(50)), department (varchar(50)), salary (decimal). b) Add a new column email (varchar(100)) to the Employee table. 3 
Q32Consider the following two tables: Employee emp_id emp_name dept_id salary manager_id 101 Rahul 1 50000 201 102 Priya 2 60000 NULL 103 Amit 1 55000 201 104 Simran 3 70000 202 Department dept_id dept_name location 1 Finance Mumbai 2 Human Resource Delhi 3 Marketing Mumbai Write SQL queries for the following: a) Retrieve the employee name, department name and salary of employees who work in the ‘Mumbai’ location. b) Find the average salary of employees in each department. c) Select the department name and count of employees in each department but only for departments having more than 1 employee. OR Consider the following two tables: Employee emp_id emp_name dept_id salary manager_id 101 Rahul 1 50000 201 102 Priya 2 60000 NULL 103 Amit 1 55000 201 104 Simran 3 70000 202 Department dept_id dept_name location 1 Finance Mumbai 2 Human Resource Delhi 3 Marketing Mumbai Write SQL queries for the following: a) Retrieve the employee name, department name and salary of employees who work in the ‘Mumbai’ location. b) Find the average salary of employees in each department. c) Select the department name and count of employees in each department but only for departments having more than 1 employee. OR.  Consider the following two tables: Student student id student name class city marks 1 Rahul 10 Mumbai 85 2 Priya 10 Delhi 90 3 Amit 11 Mumbai NULL 4 Sneha 11 Bangalore 75 5 Arjun 10 Delhi 65 Class Teacher Class teacher_name subject 10 Mr. Sharma Mathematics 11 Mrs. Gupta Science 12 Mr. Kumar English Write SQL queries for the following: a) Retrieve student names and their teacher names for all students studying in Delhi or Mumbai. b) Find the average marks obtained by students in each class. c) Count the number of students in each city and display only cities with more than 1 student.
 3 
SECTION-D   4X2=8 
Q33Write a Python program to plot a histogram for the following dataset of exam scores using 4 Matplotlib: scores = [55, 85, 78, 90, 88, 76, 95, 89, 82, 70, 68, 75, 85, 92, 79] Your program should: [A]Import the necessary library. [B]Plot the histogram with appropriate bins. [C]Add a title “Exam Scores Histogram” and label the x-axis as “Scores” and y-axis as Number of Students [D]Display the plot.  
Q34Consider a table named Sales. Table: Sales sale id Product quantity price sale_date 1 Notebook 5 250.00 2025-02-15 2 Pen 11 NULL 2025-03-12 3 Pen 3 300.00 2025-05-10 4 Notebook 7 120.00 2025-06-20 5 Textbook 12 80.00 2025-05-01 Write SQL queries for the following: a) Find the total revenue generated from all sales. b) Retrieve all sales sorted by quantity where the product name contains the word ‘Book’. c) List the total quantities sold in the month of May. d) Find the number of products sold where the quantity is less than 10. OR Write the output of the following queries. a) SELECT product, COUNT(price) FROM Sales GROUP BY product HAVING COUNT(*)>1; b) SELECT product, price FROM Sales WHERE product LIKE ‘%Book%’; c) SELECT product, SUM(quantity) from Sales GROUP BY product; d) SELECT AVG(price) FROM Sales WHERE quantity > 10;  
SECTION -E   5X3=15 
Q35INDIAN PUBLIC SCHOOL in Darjeeling is setting up the network between its different wings. 5 There are 4 wings named as Senior (S), Junior (J), Admin (A) and Hostel (H). Distance between various Wings                               Number of Computers: Connection Distance A to S 100 m A to J 200 m A to H 400 m S to J 300 m S to H 100 m J to H 450 m A-10 S-200 J-100 H-50          Answer the following: (a) Draw a suitable cable layout for connecting these four wings using the most efficient topology. (b) Which wing is best for installing the server and why? (c) Where should the Hub/Switch be placed and why? (d) Name the economic technology you would recommend for providing Internet access to all wings. (e) Suggest the placement of Repeater for this network, with justification  
Q36Answer the following based on the given dataframe named df: EmpID Name Department Salary Bonus 101 Amit IT 55000 5000 102 Bina HR 48000 4000 103 Chirag IT 62000 6000 104 Divya Sales 45000 3000 105 Eshan HR 50000 3500 a) Write a Python statement to display only Name and Salary columns. b) Write a statement to display details of employees working in the HR department. c) Add a new column TotalPay having the sum of Salary and Bonus. d) Display details of employees whose TotalPay is more than 55000. e) Display the average of salary column.  
Q37Write suitable SQL query for the following: a) Display the first 4 characters of the Name column from the Student table. b) Display the position of the substring ‘ra’ in the Name column. c) Round the value in Salary column to the nearest integer. d) Calculate the remainder of Marks divided by 7. e) To display the name of the day of current date. OR Write suitable SQL query for the following: a) Display the last 3 characters of PhoneNumber from Employee table. b) Extract a substring starting at position 2 and ending at position 5 in Name column of Student table. c) Find the square root of numbers from the column Area of table House, d) Extract the year from the DOB column of student table. e) To display the current month name.  
error: Content is protected !!
Scroll to Top