Students must start practicing the questions from CBSE Sample Papers for Class 11 Informatics Practices with Solutions Set 2 are designed as per the revised syllabus.
CBSE Sample Papers for Class 11 Informatics Practices Set 2 with Solutions
Time Allowed: 3 hours
Maximum Marks: 70
General Instructions:
- This question paper contains five sections, Section A to E.
- All questions are compulsory.
- Section A has 18 questions carrying 01 mark each.
- Section B has 07 Very Short Answer type questions carrying 02 marks each.
- Section C has 05 Short Answer type questions carrying 03 marks each.
- Section D has 02 questions carrying 04 marks each.
- Section E has 03 questions carrying 05 marks each.
- All programming questions are to be answered using Python Language only.
Section-A
Section A Consists of 18 questions of 1 mark each
Question 1.
RAM is of …………….. types. [1]
(A) 3
(B) 5
(C) 2
(D) 4
Answer:
(C) 2
Explanation:
There are two types of Random Access Memory or RAM. They are SRAM (Static RAM) and DRAM (Dynamic RAM).
Question 2.
A type of VR environment in which subjects are visually isolated from the real environment. [1]
(A) Immersive
(B) Semi immersive
(C) Non immersive
(D) augmented
Answer:
(A) Immersive
Explanation:
An immersive experience pulls a viewer into another real or imagined world, enabling them to manipulate and interact with their environment. The other type of experience is where you are shown around a real or imagined environment via desktop, tablet, mobile or via VR (Virtual Reality) headset.
Question 3.
Which of the following is not an example of system software? [1]
(A) Language Translator
(B) Utility Software
(C) Operating System
(D) Word Processors
Answer:
(D) Word Processors
Explanation:
The software that provides the basic functionality to operate a computer by interacting directly with its constituent hardware is termed as system software.
Question 4.
A constraint written after all the column definitions are over in CREATE TABLE command is applicable to [1]
(A) Last column
(B) First column
(C) Invalid syntax
(D) Complete table
Answer:
(D) Complete table
Explanation:
A column constraint is applicable only to a column whereas a table-constraint is applicable to multiple columns.
Question 5.
The …………….. character is used to match multiple unknown characters while using Like clause: [1]
(A) _
(B) ^
(C) %
(D) &
Answer:
(C) %
Explanation:
The % wildcard character matches 0 or multiple unknown characters in a pattern match using Like clause.
Question 6.
The predictive typing feature of search engine that helps us by suggesting the next word in the sentence while typing keywords and the spell checking features are examples of …………. [1]
(A) Machine Learning
(B) Natural Language Processing
(C) Error checking
(D) Auto correct Option
Answer:
(B) Natural Language Processing
Explanation:
Natural language processing is a subfield of linguistics, computer science, and artificial intelligence concerned with the interactions between computers and human language, in particular how to program computers to process and analyze large amounts of natural language data.
Question 7.
What will be the output of the following Python statement? [1]
>>>”a”+”bc”
(A) bc
(B) abc
(C) a
(D) bca
Answer:
(B) abc
Explanation:
+ operator is concatenation operator.
Question 8.
A list contains ………….. data. [1]
(A) Homogeneous
(B) Heterogeneous
(C) Numeric only
(D) Character only
Answer:
(B) Heterogeneous
Explanation:
A list is a record that stores different data related to an entity of the relation. Hence it contains Heterogeneous data.
Question 9.
Which property of a relation is used to represent number of rows? [1]
(A) Key
(B) Attribute
(C) Degree
(D) Cardinality
Answer:
(D) Cardinality
Explanation:
The total number of rows in a table is called as cardinality.
Question 10.
Which of the following statements is used to create an empty set in Python? [1]
(A) ( )
(B) [ ]
(C) { }
(D) set( )
Answer:
(D) set( )
Explanation:
{ } creates a dictionary not a set. Only set() creates an empty set.
Question 11.
The number of alternate keys in a table can be ………….. [1]
(A) Only 1
(B) 2
(C) 3
(D) Multiple
Answer:
(D) Multiple
Explanation:
A table can have multiple columns that are candidate keys and out of them one is primary key. Hence there can be multiple alternate keys.
Question 12.
The expression:
362H7 + 26%52 – 2**8 +5 evaluates to: [1]
(A) -174
(B) -174.5
(C) 174
(D) 175
Answer:
(A) -174
Explanation:
362//7 + 26%52 – 2**8 +5
= 51 + 26 – 256 + 5
= 77 – 256 + 5
= -174
Question 13.
…………….. is a subsystem of Artificial Intelligence, wherein computers have the ability to learn from data using statistical techniques, without being explicitly programmed by a human being. [1]
(A) Machine Learning
(B) Natural Language
(C) Statistical Learning
(D) Virtual Reality
Answer:
(A) Machine Learning
Explanation:
Machine learning is the study of computer algorithms that can improve automatically through experience and by the use of data. It is seen as a part of artificial intelligence.
Question 14.
A SQL command that removes all the data of a table along with the table structure is …………… [1]
(A) Delete
(B) Remove
(C) Drop
(D) None of these
Answer:
(C) Drop
Explanation:
The Drop command is a DDL command that removes all the data of a table along with the table structure.
Question 15.
………….. acts as a supervisor by controlling and guiding the operations taking place. [1]
(A) Arithmetic logic unit
(B) Control unit
(C) Memory unit
(D) None of these
Answer:
(B) Control unit
Explanation:
A control unit (CU) handles all processor control signals. It directs all input and output flow, fetches code for instructions from microprograms and directs other units and models by providing control and timing signals.
Question 16.
Why does computer know nothing? [1]
(A) It is dumb
(B) It is a machine
(C) It has no brain
(D) It doesn’t want to learn anything
Answer:
(B) It is a machine
Directions (Q17 and Q18): In the following questions, A statement of Assertion (A) is followed by a statement of Reason (R).
Mark the correct choice as
Question 17.
Assertion (A): A data bus is bi directional
Reason (R): It needs to send and receive data from devices. [1]
(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
(E) Both A and R are false
Answer:
(A) Both A and R are true and R is the correct explanation of A
Question 18.
Assertion (A): Python data types are used to define the types of a variable.
Reason (R): A Python variable is a symbolic name that is a reference or pointer to an object. [1]
(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
(E) Both A and R are false
Answer:
(A) Both A and R are true and R is the correct explanation of A
Explanation:
A variable in Python is a named label that refers to some value. Python variables do not need explicit declaration to reserve memory space. The variable’s declaration is automatically done when you assign a value to the variable.
Section B
Section B consists of 7 questions of 2 marks each.
Question 19.
What is the difference between triple quoted multi-line string and a multiline string with backslash (\) ? [2]
Or
How many types of string operators are there in Python ?
Answer:
Triple quoted multiline strings also count end of line (EOL) characters in the size of the string whereas the multiline strings with backslash ( \ ) at the end of physical line do not count backslash ( \ ) in the size of the string.
OR
There are two types of string operators
(i) Concatenation operator (+)
(ii) Replication operator (*)
Question 20.
How do you specify a Long integer and a Unicode string in Python ? [2]
Answer:
Suffix L makes a long integer e.g. 15L is a long integer and 15 is an integer. Unicode string values are written as normal string prefixed with u. e.g., u‘Hello‘, u ‘Abc‘ etc
Question 21.
What is the difference between CHAR and VARCHAR2 datatype in SQL ? [2]
Answer:
Both CHAR and VARCHAR2 are used for characters datatype but varchar2 is used for character strings of variable length whereas char is used for strings of fixed length.
Question 22.
Write the output of the given Python code [2]
list1 = [‘physics’, ‘chemistry’, 1997, 2000]
list2 = [1, 2, 3, 4, 5, 6, 7]
print (“List1 [1: 5] : “, list2[1: 5])
Answer:
List2[1: 5]: [2, 3, 4, 5]
Question 23.
Write benefit of using cloud services. [2]
Answer:
One benefit of using cloud computing services is that firms can avoid the up front cost and complexity of owning and maintaining their own IT infrastructure and instead simply pay for what they use, when they use it.
Question 24.
Write a program to accept a number n from the user and print its table. [2]
Answer:
n = int (input (“Enter the number”))
Print (“Table of” , n)
For i in range (1, 11):
Print (n, “*”, i,” = ”, n * i)
Question 25.
Rewrite the following code in Python after removing all syntax errors. Underline each correction done in the code. [2]
For Name in [Amar, Shweta, Parag]
If Name [0] = ‘s’:
Print (Name)
Answer:
for Name in [“Amar”, “Shweta”, “Parag”]:
If Name [0] = = ‘s’:
Print (Name)
Section C
Section C consists of 5 questions of 3 marks each.
Question 26.
Write SQL command for the table Garments as shown below : [3]
(i) Display details of “Cotton” and “Silk” garments
(ii) Increase price of “Silk” garments by 200 , if their price is less than 2000.
(iii) Add a new column Reorder of type integer(4)
Answer:
(i)Select * from Garments where Type in (“Cotton”,”Silk”);
(ii)Update garments set price=price+200 where type=”Silk” and price<2000;
(iii) Alter table Garments ADD Reorder integer(4);
Or
(i) Remove the column Qty
(ii) Delete the records of cloths whose Gname has first character as “S” and 3rd character as “r”
(iii) Add the following record to the table :
“C06″Cap” ,50,25.00/’ Silk”
Answer:
(i) Alter table Cloth DROP Column Qty;
(ii) Delete from Cloth where Gname like “S_r%”;
(iii)Insert into cloth values(“C06”,”Cap”,50,25.00,”Silk”);
Question 27.
What result will be produced after executing the following code : [3]
list1 = [‘Delhi’, ‘Meerut’, ‘Hapur’, ‘Agra’]
list2 = list1
list3 = list1 [:]
list2[1] = ‘Mumbai’
list3[3] = ‘Chandigarh’
sum = 0
for i in (list1, list2, list3):
if i[1] == ‘Mumbai’:
sum + = 5
if i[3] = = ‘Chandigarh’ :
sum + = 10
print (sum)
Answer:
Output :
20
Question 28.
Answer the following questions : [3]
(i) What will happen if any query we write “Aaliya” as “AALIYA” or “aaliya” ? Will the query generate the same output or an error ?
(ii) Which syntax should be used when we are not sure of the order [with respect to the column] in which the values are to be inserted in the table?
(iii) Can we insert two records with the same roll number?
Answer:
(i) The query will generate same output because queries of SQL are not case sensitive.
(ii) Insert INTO table_name (Col1, Col2,…..) VALUES (Val1, Val2,…..);
(iii) No, Roll numbers are used to uniquely identify a candidate, so these can’t be duplicate.
Question 29.
Give the terms for each of the following: [3]
(i) Collection of logically related records.
(ii) The skeleton structure that represents the logical view of the entire database.
(iii) Attribute that can uniquely identify the tuples in a relation.
Answer:
(i) Database
(ii) Database schema
(iii) Primary key
OR
Define the components of database systems.
Answer:
The major components of a database system are described below:
(i) User: The users are the people who manage the database and perform different operations on it.
(ii) Hardware: The hardware consists of various secondary storage devices such as CD, DVD, floppy disks, etc. on which data is stored and input/output devices such as mouse, keyboard, printer, monitor etc., which are used for providing commands and retrieving the result.
(iii) Software: It acts as an interface between the user and the database.
(iv) Data: It is an important component of database. The purpose, of DBMS is to collect, store, process and access data.
Question 30.
Write a Python program to input sale amount and calculate the discount as per the following criteria. The discount rates are: [3]
Amount | Discount |
0-10000 | 10% |
10000-20000 | 15% |
20000-30000 | 25% |
Above 30000 | 35% |
Answer:
amt = int(input(“Enter Sale Amount:’))
If(amt>0);
if amt < = 10000:
disc = amt*0.10
elif amt < = 20000:
disc = amt*0.15
elif amt< = 30000:
disc = 0.25*amt
else:
disc = 0.35*amt
print(“Discount:”, disc)
print(“Net Amount to be paid:”, amt-disc)
else:
Print(“Invalid Amount”)
Section D
Section D consists of 2 questions of 4 marks each.
Question 31.
Sonali wants to perform certain operations on a table Exam storing exam details . She is not sure about some of the commands and is getting errors.
Help her in proper execution of her operations. [4]
Table – Exam
ExamID | Examname | Maxmarks | Passmarks |
E01 | Halfyearly | 45 | 14.0 |
E02 | Term-I | 35 | 10.5 |
E03 | Preboard | 50 | 15.0 |
E04 | Unit Test | 20 | 7.0 |
E05 | Term-II | 35 | 10.5 |
(i) To increase the Passmarks by 5
(ii) She wants to add a new column “Negativemarks” of type integer.
(iii) She is confused whether she has to use Delete or Drop command for deleting all data of the table keeping the structure. Which command she has to use?
(iv) Can she add another ExamID as “E05”?
Answer:
(i) Update exam set Passmarks=passmarks+5;
(ii) Alter table Exam ADD Negativemarks integer;
(iii) Delete from Exam;
(iv) No, since ExamID is possible primary key.
Question 32 .
Answer the following questions : [4]
(i) What is the syntax of if statement ?
(ii) What is iteration ?
(iii) Write the syntax of range ( ) function.
OR (For part iii only)
Write output of th e following :
x = ‘abhi’
y = ‘Zoom’
if (x > y):
Print (x + y)
else:
Print (y * 2)
Answer:
(i) If < condition >:
Statement (s)
(ii) Each time, when the loop body gets executed, is called an iteration.
(iii)range (< lower_ limit >, < upper _ limit >, <step _ value >)
OR (Part (iii) only)
abhi Zoom.
Section-E
Section E consists of 3 questions of 5 marks each.
Question 33.
Consider the following table STOCK and answer the questions (i) to (v) [5]
(i) To display Name of all items in the stock table whose quantity is more than 200.
(ii) To display item code and unit price of Office file.
(iii) To display the details of all items.
(iv) To display dealer code with stock date of item Drawing copy.
(v) Increase the width of Itname column to varchar(40)
Answer:
(i) Select Itname from Stock where Qty > 200;
(ii) Select Itcode,Unitpr from Stock where Itname=”Office file”;
(iii) Select * from stock;
(iv) Select Decode, Stkdate from stock where Itname=”Drawing copy”;
(v) Alter table Stock Modify Itname varchar(40);
OR
Write SQL queries with respect to the table Employee given below :
(i) Display details of employees who stay in a Nagar
(ii) Increase salary of employees by 2000 for department number “D03”
(iii) Display names of employees whose name starts with “R”
(iv) Add a new column Email varchar(20) to the table
(v) Remove the entire table.
Answer:
(i) Select * from Employee where EMP_Address like “%Nagar”;
(ii) Update Employee set EMP_SALARY =EMP_SALARY +2000 where EMP_DEPT_NO=”D03”;
(iii) Select EMP_NAME from Employee where EMP_Name like “R%”;
(iv) Alter table Employee ADD Email varchar(20);
(v) Drop table Employee;
Question 34.
Name the input/output device used to do the following: [5]
(i) To output audio
(ii) To enter textual data
(iii) To make hard copy of a text file
(iv) To display the data/information
(v) To enter audio based command
(vi) To build 3D models
(vii)To assist a visually impaired individual in entering data.
Answer:
(i) Speakers
(ii) Keyboard
(iii) Printer
(iv) Monitor/VDU
(v) Microphone
(vi) 3-D Printers
(vii) Microphone
Question 35.
Write SQL queries for the questions that follow based on table Student. [5]
(i) To display student name, subject and their marks in increasing order
(ii) To display the details of those students whose name is started from ‘V’.
(iii) To display student name, marks, address of those students whose marks greater than 75 but less than 90.
(iv) To display the details of those students who opted the subject other than Commerce.
(v) To display student name and their respective marks whose subject is Science.
Answer:
(i) SELECT Stu_Name, Subject, Marks FROM Student ORDER BY Stu_Name ASC;
(ii) SELECT * FROM Student WHERE Stu_Name LIKE ‘V%’;
(iii) SELECT Stu_Name, Marks, Address FROM Student WHERE Marks > 75 and Marks < 90;
(iv) SELECT * FROM Student WHERE Subject NOT IN (‘Commerce’);
(v) SELECT Stu_Name, Marks FROM Student WHERE Subject = “ Science”.
OR
Consider the following table 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 for the operator.
(iii) To display the name of the workers, their DOB and corresponding Ecode for “Supervisors”
(iv) To count the total number of “Operators”.
(v) To display the plevel and DOJ whose name start with A;
Answer:
(i) ALTER TABLE WORKER MODIFY NAME VARCHAR(40);
(ii) SELECT NAME, DESIGN FROM WORKER WHERE DESIGN = “Operator”;
(iii) SELECT NAME, DOB, ECODE FROM WORKER WHERE DESIGN=”Supervisor”;
(iv) SELECT COUNT(*) FROM WORKER WHERE DESIGN=”Operator”;
(v) SELECT PLEVEL, DOJ FROM WORKER WHERE NAME LIKE “A%”;