Students must start practicing the questions from CBSE Sample Papers for Class 12 Informatics Practices with Solutions Set 10 are designed as per the revised syllabus.
CBSE Sample Papers for Class 12 Informatics Practices Set 10 with Solutions
Time Allowed: 3 hours
Maximum Marks: 70
General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A has 18 questions carrying 01 mark each.
4. Section B has 07 Very Short Answer type questions carrying 02 marks each,
5. Section C has 05 Short Answer type questions carrying 03 marks each.
6. Section D has 02 questions carrying 04 marks each.
7. Section E has 03 questions carrying 05 marks each.
8. All programming questions are to be answered using Python Language only.
Section A
Question 1.
identifies a specific computer on the web and the main page of the entire site?
(i) WWW
(ii) Link
(iii) SQL
(iv) URL
Answer:
(iv) URL
Explanation: Just as buildings and houses have a street address, web pages also have unique addresses to help people locate them. On the Internet, these addresses are called URLs (Uniform Resource Locators).
Question 2.
Data protection refers to protecting data from
(i) Substantial Harm
(ii) Embarrassment
(iii) Inconvenience and unfairness
(iv) All of these
Answer:
(iv) All of these
Explanation: Data protection is a set of strategies and processes you can use to secure the privacy, availability, and integrity of your data.
Question 3.
We should exhibit proper manners and etiquettes while being online. Choose the right net etiquette (s) from the following:
(i) Avoid Cyber Bullying
(ii) Respect Other’s Privacy
(iii) No Copyright violation
(iv) All of the above
Answer:
(iv) All of the above
Explanation: Avoid cyber bullying, respect others privacy and No Copyright violation are all the example of etiquettes while being online.
Question 4.
Predict the output of the following query: SELECT LENGTH (“SQL Data”);
(i) 4
(ii) 5
(iii) 8
(iv) 10
Answer:
(iii) 8
Explanation: LENGTH( ) function is used to return the length of the specifid string. It returns the length in bytes. Ths function also includes all the blank spaces which are include in string.
Question 5.
Which clause is used to specify condition with a GROUP BY clause?
(i) USE
(ii) WHERE
(iii) HAVING
(iv) LIKE
Answer:
(iii) HAVING
Explanation: A HAVING clause in SQL specifis that an SQL SELECT statement must only return rows where aggregate values met the specifid conditions. Aftr the aggregating operation, HAVING is applied, fitering out the rows that don’t match the specifid conditions.
Question 6.
When someone steals someone else’s personal information to commit theft or fraud, it is called _____
(i) Identity theft
(ii) Hacking
(iii) Computer piracy
(iv) Infringement
Answer:
(i) Identity theft
Explanation: Identify thieves increasingly use personal informational stolen from computers r computer networks, to commit fraud by using the data gained unlawfully. The four types of identity thef include medical, criminal, fiancial and child identity theft.
Question 7.
Matplotlib was originally written by-
(i) Travis Oliphant
(ii) Guido van Rossum
(iii) John D. Hunter
(iv) Jim Hugunin
Answer:
(iii) John D. Hunter
Explanation: John D. Hunter was an American neurobiologist and the original author of Matplotlib.
Question 8.
Gopi Krishna is using a table Employee. It has the following columns:
Code, Name, Salary, Deptcode
SELECT Deptcode, MAX(Salary) FROM Employee;
He wants to display maximum salary departmentwise. But he did not get the desired result. Which of the following is a correct query to perform the given task?
(i) SELECT Deptcode, MAX (Salary) FROM Employee GROUP BY Deptcode;
(ii) SELECT Deptcode, MAX (Salary) FROM Employee ORDER BY Deptcode;
(iii) SELECT Deptcode, MAX(Salary) FROM Employee ORDER BY HAVING Deptcode;
(iv) SELECT Deptcode, MAX(Salary) FROM Employee GROUP BY Deptcode HAVING;
Answer:
(i) SELECT Deptcode, MAX (Salary) FROM Employee GROUP BY Deptcode;
Explanation: GROUP BY clause is used to group the rows that have the same value.
Question 9.
Predict the output of the following query:
SELECT INSTR(‘INTER NATIONAL’,
(i) 8
(ii) 6
(iii) 7
(iv) 9
Answer:
(iii) 7
Explanation: INSTR( ) function takes two arguments as str (string) and sub_str (sub string) and returns the position of the fist occurrence of a specifid sub_str from a given str.
Question 10.
Which of the following input can be accepted by Data Frame?
(i) Structured ndarray
(ii) Series
(iii) DataFrame
(iv) All of these
Answer:
(iv) All of these
Explanation: DataFrame is a 2-dimensional labeled data structure with columns of potentially diffrent types.
Question 11.
“COUNT” keyword belongs to which categories in Mysql?
(i) Aggregate functions
(ii) Operators
(iii) Qauses
(iv) All of these
Answer:
(i) Aggregate functions
Explanation: COUNT(*) returns the number of rows in a specifid table, and it preserves duplicate rows. It counts each row separately. Ths includes rows that contain null values.
Question 12.
To display third element of a Series object S, you will write:
(i) S[:3]
(ii) S[2]
(iii) S[3]
(iv) S[:2]
Answer:
(ii) S[2]
Explanation: S[2] will return the element present at 2 index i.e. third element of a series.
Question 13.
Suhana is down with fever. So, she decided not to go to school next day. Next day, in the evening she called up her classmate, Shaurya and enquired about the computer class. She also requested him to explain the concept. Shaurya said, “Mam taught us how to use tuples in python”. Further, he generously said, “Give me some time, I will email you the material which will help you to understand tuples in python”. Shaurya quickly downloaded a 2-minute clip from the Internet explaining the concept of tuples in python. Using video editor, he added the text “Prepared by Shaurya” in the downloaded video clip. Then, he emailed the modified video clip to Suhana. This
act of Shaurya is an example of:
(i) Fair use
(ii) Hacking
(iii) Copyright infringement
(iv) Cyber crime
Answer:
(iii) Copyright infringement
Explanation: Copyright infringement refers to the unauthorized use of someone’s copyrighted work.
Question 14.
In SQL, SUBSTRING () is equivalent to
(i) LCASE ()
(ii) UCASEO
(iii) MID()
(iv) INSTR()
Answer:
(iii) MID()
Explanation: MID( ) function extracts a substring from a string and returns a string with given length and position.
Question 15.
When sending an Email, the line describes the main recipient of the message.
(i) To
(ii) Cc
(iii) Subject
(iv) Contents
Answer:
(i) To
Explanation: Th recipients listed in the “To” fild are the direct addressees of the e-mail message.
Question 16.
Hackers usually used the computer virus for purpose.
(i) To log, monitor each and every user’s stroke
(ii) To gain access of the sensitive information like user’s Id and Passwords
(iii) To corrupt the user’s data stored in the computer system
(iv) All of the above
Answer:
(iv) All of the above
Explanation: In general, hackers use computer viruses to perform several diffrent tasks such as to corrupt the user’s data stored in his system, to gain access of the important information, to monitor or log user’s each stroke.
Question 17.
Assertion (A): e-mail stands for environmental Mail.
Reason (R): e-mail is a paperless method of sending messages, notes, pictures and even sound files from one place to another using the Internet as a medium.
(i) Both A and R are true and R is the correct explanation for A
(ii) Both A and R are true and R is not the correct explanation for A
(iii) A is True but R is False
(iv) A is false but R is True
Answer:
(iv) A is false but R is True
Explanation: E-mail stands for Electronic Mail. It is a paperless method of sending messages, notes, pictures and even sound fies from one place to another using the Internet as a medium. E-mail address is an individual name which is used to send and receive e-mail on the Internet.
Question 18.
Assertion (A): Line chart can be plotted by using (x, y) method.
Reason (R): Labels show what the chart is about. .
(i) Both A and R are true and R is the correct explanation for A
(ii) Both A and R are true and R is not the correct explanation for A
(iii) A is True but R is False
(iv) A is false but R is True
Answer:
(ii) Both A and R are true and R is not the correct explanation for A
Explanation: First import matplotlib and NumPy, these are useful for charting. You can use the plot(x,y) method to create a line chart.
Labels are a type of meta data. They show what the chart is about. The chart has an x label, y label and title.
Section B
Question 19.
What do you mean by plug-ins?
OR
ABC bank has many computers connected in a building. What type of network is formed? Name two hardware resources that can be shared by the computers connected in the bank network.
Answer:
Plug-ins are software additions that allow for the customization of computer programs, apps and web browser as well as the customization of the content offered by websites. While plug-ins continue to be used by add-ons to customize programs and apps, their use in web browser has decreased somewhat, in favour of using browser extensions instead.
OR
Type of network that is formed: LAN/Local Area
Network. The Hardware Resources that can be shared:
• Modem
• Printer
• Scanner
• Hard disk
Question 20.
The python code written below has syntactical errors. Rewrite the correct code and underline the corrections made.
import Pandas as pd dict={'Name' : ["Rahul", "Kiyaan", "Shreya", "Riya"], "Salary" = ["28000", "38000", "34000", "3600"]} info=pd.dataFrame(Diet, index=[True, False, False, True]) print (information)
Answer:
import pandas as pd dict={‘Name’ : [“Rahul”, “Kiyaan”,“Shreya”, “Riya”], “Salary” : [“28000”, “38000”, “34000”, “3600”]} info=pd. DataFrame(dict, index=[True, False, False, True]) print (info)
Question 21.
Considering the same string “Preoccupied”:
DisplayWrite SQL queries for the following:
(i) The position of the substring ‘cup’ in thestring”Preoccupied”
(ii) The first 4 letters of the string.
Answer:
(i) SELECT INSTR (“Preoccupied”, “cup”);
(ii) SELECT LEFT (“Preoccupied”, 4);
Question 22.
Predict the output of the given Python code:
import pandas as pd data = [{'abc' : 10, 'xyz' : 20, 'pqr' : 30}, {'The' : 10, 'pqr' : 20, 'xyz' : 30, 'abc' : 40}] value = pd.DataFrame (data) print(value)
Answer:
Question 23.
What do you mean by copyright ?
Answer:
It grants legal rights to creators for their original works like writing, photograph, audio recordings, video, sculptures, architectural works, computer software, and other creative works like literary and artistic work.
Copyrights are automatically granted to creators and authors. Copyright law gives the copyright holder a set of rights, that they alone can avail legally. The rights include right to copy (reproduce) a work, right to create derivative works based upon it, right to distribute copies of the work to the public and right to publicly display or perform the work. It prevents others from copying, using or selling the work.
Question 24.
Complete the given Python code to get the required output as:
Code:
import ____ EMP={'EMPID' : ['E01','E02','E03','E04','E05'], 'EMPNAME' : ['KISHOR','PRIYA','DAMODAR','REEMA', 'MANOJ'], 'EMP_SALARY':[67000,34000,68000,90000,43000]} df=pandas____. (EMP, ____=['001' , '002' , ' 003' , ' 004' , ' 005' ]) print (____)
Answer:
import pandas EMP={‘EMPID’ : [‘E01’,’E02’,’E03’, ’E04’,’E05’], ‘EMPNAME’ : [‘KISHOR’,’PRIYA’, ’DAMODAR’,’REEMA’, ‘MANOJ’], ‘EMP_SALARY’:[67000,34000,68000, 90000, 43000]} df=pandas.DataFrame(EMP,index=[‘001’, ‘002’,’003’,’004’,’005’]) #print(df) print(df.loc[‘001’:’003’,:])
Question 25.
Explain MAX0 function with an example.
Answer:
MAX ([DISTINCT] expr): It returns the maximum value of expr. MAX () may take a string argument; in such cases, it returns the maximum string value. The DISTINCT keyword can be used to fid the maximum of the distinct values of expr; however, this produces the same result as omitting DISTINCT. MAX () returns NULL if there are no matching rows.
e.g. SELECT Student_Name, MAX(Test_Score) FROM Student GROUP BY Student_Name;
Section C
Question 26.
Write SQL queries with respect to the table STUDENTS given below :
Table: STUDENTS
(i) To display the total number of distinct RNO.
(ii) To display a report showing Name , Class and Address of students whose name-has “EE”, in descending order of SEC.
(iii) To change the address to C-97 for those who do not have an address.
Answer:
(i) SELECT COUNT(DISTINCT RNO) FROM STUDENTS;
(ii) SELECT NAME , CLASS, , ADDRESS FROM STUDENTS WHERE NAME LIKE “%EE%” ORDER BY SEC DESC;
(iii) UPDATE STUDENTS SET ADDRESS=”C-97” WHERE ADDRESS IS NULL;
OR
Predict the output of the following queries based on the table STUDENTS given above:
(i) SELECT NAME FROM STUDENTS WHERE PHONE IS NULL;
(ii) SELECT LEFT (ADMNO, 2) FROM STUDENTS WHERE RNO = 3;
(iii) SELECT NAME, RNO FROM STUDENTS WHERE ADDRESS LIKE “B%”;
Answer:
(i) MEENA
(ii) 12
(iii) VANI 1
Question 27.
Create a following DataFrame in Python
Answer:
import pandas as pd t= {‘Rollno’: [101, 102, 103, 104, 105, 106, 107], ‘Name’: [‘Shubrato’, ‘Krishna’, ‘Pranshu’,’Gurpreet’, ‘Arpit’, ‘Sanidhya’, ‘Aurobindo’], ‘Age’: [15, 14, 14, 15, 16, 15, 16], ‘Marks’: [77.9, 70.4, 60.9, 80.3, 86.5, 67.7, 85.0], ‘Grade’: [‘11B’, ‘11A’, ‘11B’, ‘11C’,’11E’, ‘11A’,’11C’]} df = pd.DataFrame (t,index=[10, 20, 30, 40, 50, 60,70]) print (df)
Question 28.
Write MySQL statements for the following:
(i) Create a table ITEM whose fields are:
PRODUCTID (Primary Key)
P_NAME
QTY
PRICE
(ii) To add a new column MANUFACTURER with varchar data type.
Answer:
(i) CREATE TABLE ITEM (PRODUCTID INT PRIMARY KEY, P_NAME CHAR (20), QTY INT, PRICE FLOAT (10));
(ii) ALTER TABLE ITEM ADD MANUFACTURER varchar(25);
Question 29.
Sourabh has to prepare a project on “Digital India Initiatives”. He decides to get information from the Internet. He downloads three web pages (webpage 1, webpage 2, webpage 3) containing information on Digital India Initiatives. Which of the following steps taken by Sourabh is an example of plagiarism or copyright infringement? Give justification in support of your answer.
(i) He read a paragraph on “Digital India Initiatives” from webpage 1 and rephrased it in his own words. He finally pasted the rephrased paragraph in his project.
(ii) He downloaded three images of “Digital India Initiatives” from webpage 2. He made a collage for his project using these images.
(iii) He downloaded “Digital India Initiative” icon from web page 3 and pasted it on the front page of his project report.
Answer:
(i) It is plagiarism.
Even if someone derives an idea or a product from an already existing idea or product, but instead presents it as a new idea, then also it is plagiarism.
(ii) It is again plagiarism
Because he copied the existing images and presented them as a new idea in this case it is a collage.
(iii) It is copyright infringement
Copyright infringement is when we use other person’s work without obtaining their permission to use or we have not paid for it, if it is being sold. Example, we download an image from the Internet and use it in our project.
OR
What is hacking?
Answer:
Hacking is the act of unauthorised access to a computer, computer network or any digital system. Hackers usually have technical expertise of the hardware and software. They look for bugs to exploit and break into the system. Hacking, when done with a positive intent is called ethical hacking. Such ethical hackers are known as white hat hackers. They are specialists in exploring any vulnerability or loophole during testing of the software.
Question 30.
Consider the following DataFrame df
Write suitable Python statements for the following:
(i) Write down the command that will add a column “eligible” with default values as ‘yes’.
(ii) Write the command to extract the complete row ‘T03’.
(iii) Write the statement to list the first three entries of the DataFrame ‘df’.
Answer:
(i) df[‘eligible’]=‘yes‘
(ii) df.loc[‘T03’,:]
(iii) df.head(3)
Section D
Question 31.
Consider the following tables WORKER:
Table: WORKER
(i) Write the statement to increase the width of the column “Name” to varchar(40).
(ii) To display the worker name and designation whose plevel is P002.
(iii) To display the name of the workers, their DOB whose name start with A.
(iv) To count the total number of “Operators”.
Answer:
(i) ALTER TABLE WORKER MODIFY NAME VARCHAR(40);
(ii) SELECT NAME, DESIGN FROM WORKER WHERE PLEVEL = “P002”;
(iii) SELECT NAME, DOB FROM WORKER WHERE NAME LIKE “ A%”;
(iv) SELECT COUNT(*) FROM WORKER WHERE DESIGN=”OPERATOR”;
Question 32.
Zeenat has created the following DataFrame dfl to keep track of data Rollno, Name, Marksl and Marks2 for various students of her class where row indexes are taken as the default values:
Answer the following questions:
(i) Predict the output of the following python statement:
a. print (dfl. size)
b. print (df1.tail (1))
(ii) Write statement to delete the 3rd column.
(iii) She needs to know the marks scored by Rollno 2. Write statement for this.
OR
(Option for part iii only)
Write statement that will give 90,95 as output from the dataframe df1.
Answer:
(i)
a. 16
b. 4 Jay Batra 90 95
(ii) del df1[‘Marks1’]
(iii) print(df1[df1.RollNo==2])
OR
print (( dataframe1 . Marks1 . max()),(dataframe1.Marks2.max()))
Section E
Question 33.
Write suitable SQL queries for the following:
(i) To display the name of those employees whose joining month is May.
(ii) To remove the trailing spaces from the string ” Learn SQL “.
(iii) To display the substring “SQL” from the string “Learn SQL”.
(iv) To display the substring “MPUT” from the string “COMPUTER”.
(v) To display the 2 raised to the power of 23.
Answer:
(i) SELECT ENAME FROM EMP WHERE MONTH (DOJ)=5;
(ii) SELECT RTRIM (“ Learn SQL “);
(iii) SELECT RIGHT (“Learn SQL”, 3);
(iv) SELECT SUBSTR(“COMPUTER”,3,4);
(v) SELECT POWER (23, 2);
OR
Write SQL queries with respect to the table Moviedetails given below :
(i) To display the distinct platforms.
(ii) To display Title and Rating of “English” and “Hindi” movies.
(iii) To change the platform of “Uri” to “Netflix”.
(iv) To display the title of movies whose rating is greater than 4.
(v) To display language and platform of movies whose title is Uri.
Answer:
(i) SELECT DISTINCT(PLATFORM) FROM MOVIEDETAILS;
(ii) SELECT TITLE , RATING FROM MOVIEDETAILS WHERE LANGUAGE IN (“ENGLISH”,”HINDI”)
(iii) UPDATE MOVIEDETAILS SET PLATFORM=”NETFLIX” WHERE TITLE=”URI”;
(iv) SELECT TITLE FROM MOVIEDETAILS WHERE RATING > 4;
(v) SELECT LANGUAGE, PLATFORM FROM MOVIEDETAILS WHERE TITLE = “Uri”;
Question 34.
Multi-purpose Public School, Bengaluru is Setting up the network between its Different Wings of school campus. There are 4 wings named as SENIOR(S), JUNIOR(J), ADMIN(A) and HOSTEL(H).
Wing A to Wing S | 100m |
Wing A to Wing J | 200m |
Wing A to Wing H | 400m |
Wing S to Wing J | 300m |
Wing S to Wing H | 100m |
Wing J to Wing H | 450m |
Number of Computers installed at various wings are as follows:
Wings | Number of Computers |
Wing A | 20 |
Wing S | 150 |
Wing J | 50 |
WingH | 25 |
(i) Suggest the best wired medium and draw the cable layout to efficiently connect various wings of Multi-purpose Public School, Bengaluru.
(ii) Name the most suitable wing where the Server should be installed. Justify your answer.
(iii) Suggest a device/software and its placement that would provide data security for the entire network of the School.
(iv) Suggest a device that shall be needed to provide wireless Internet access to all smartphone/laptop users in the campus of Multi-purpose Public School, Bengaluru.
(v) Suggest a protocol that shall be needed to provide wireless Internet access to all smartphone/laptop users in the campus of Multi-purpose Public School, Bengaluru.
Answer:
(i) Best wired medium: Optical Fibre OR CAT5
OR CAT6 OR CAT7 OR CAT8 OR Ethernet Cable
(ii) Wing Senior(S)- Because it has maximum number of computers.
(iii) Firewall – Placed with the server at Senior
OR
Any other valid device/software.
(iv) Device Name: WiFi Router OR WiMax OR RF
Router OR Wireless Modem OR RFTransmitter
(v) Protocol: WAP OR 802.16 OR TCP/IP OR VoIP
OR MACP OR 802.11
Question 35.
Consider the following graph. Write a program in python to draw it. (Height of Bars are 10,1,0,33,6,8) Bpfl
Answer:
import numpy as np import matplotlib.pyplot as plt plt.hist((0, 10, 20, 30, 40, 50), bins=[0, 10, 20, 30, 40, 50, 60], weights=[10, 1, 0, 33, 6, 8], color=’red’, edgecolor= ‘yellow’) plt.title(‘Histogram of Student Data’) plt.xlabel(‘value’) plt.ylabel(‘Frequency’) plt.show( )
OR
Write suitable Python code to create chart as shown below:
Also give Python statement to save this chart.
Answer:
from matplotlib import pyplot as plt import numpy as np plt.bar([0.25, 1.25, 2.25, 3.25, 4.25], [70, 50, 60, 75, 30], label=”Kiyaan”,width=.5) plt.bar([.75, 1.75,2.75,3.75,4.75], [75, 60, 50, 80, 93], label =”Shreya”,color=’r’,width=.5) plt.legend( ) plt.xlabel(‘Month’) plt.ylabel(‘Salary (Thousand)’) plt.title(‘Details’) plt.savefi(“bar.jpg)