Students must start practicing the questions from CBSE Sample Papers for Class 11 Informatics Practices with Solutions Set 5 are designed as per the revised syllabus.
CBSE Sample Papers for Class 11 Informatics Practices Set 5 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.
In …………… memory, once the program or data is written, it cannot be changed? [1]
(A) EEPROM
(B) PROM
(C) EPROM
(D) None of these
Answer:
(B) PROM
Explanation:
In Programmable Read-Only Memory (PROM), if there is an error in writing instructions or data, the error cannot be erased. PROM chip becomes unusable.
Question 2.
……………. is a network of devices that have an embedded hardware and software to communicate (connect and exchange data) with other devices on the same network. [1]
(A) DBMS
(B) IoT
(C) SaaS
(D) NLP
Answer:
(B) IoT
Explanation:
Internet of Things (IoT) is a network of devices that have an embedded hardware and software to communicate (connect and exchange data, with other devices on the same network.
Question 3.
CPU memory is also called: [1]
(A) High speed memory
(B) Cache
(C) Both (A) & (B)
(D) None of these
Answer:
(C) Both (A) & (B)
Question 4.
The Describe command: [1]
(A) Creates a table
(B) Shows structure of a table
(C) Adds a record
(D) Deletes a record
Answer:
(B) Shows structure of a table
Explanation:
The describe command displays structure of a table.
Question 5.
The ………… clause is used to arrange records of a table. [1]
(A) Alter
(B) Order
(C) Structure
(D) Order by
Answer:
(D) Order by
Explanation:
The order by clause arranges records of a table in ascending or descending order.
Question 6.
…………… is a system that allows a group of connected computers to maintain a single updated and secure ledger which is updated only after all the nodes in the network authenticate the transaction. [1]
(A) P2P
(B) Client Server
(C) DBMS
(D) Blockchain
Answer:
(D) Blockchain
Explanation:
Blockchain is a system that allows a group of connected computers to maintain a single updated and secure ledger which is updated only after all the nodes in the network authenticate the transaction.
Question 7.
Which one of the following is not a keyword in Python language? [1]
(A) Pass
(B) Eval
(C) Assert
(D) Nonlocal
Answer:
(B) Eval
Explanation:
Eval can be used as a variable.
Question 8.
A condition or check applicable on a field or set of fields [1]
(A) Constraint
(B) Keyword
(C) Clause
(D) None of these
Answer:
(A) Constraint
Explanation:
Constraint is a condition or check applicable on a field or set of fields.
Question 9.
Which of the following is not a feature of MySQL: [1]
(A) Free
(B) Portable
(C) Case sensitive
(D) Supports query language
Answer:
(C) Case sensitive
Explanation:
MySQL is not case sensitive language.
Question 10.
Which of the following is true for variable names in Python? [1]
(A) Underscore and ampersand are the only two special characters allowed
(B) Unlimited length.
(C) All private members must have leading and trailing underscores.
(D) None of the mentioned
Answer:
(B) Unlimited length.
Explanation:
Variable names can be of any length.
Question 11.
A table can have maximum of primary keys : [1]
(A) 1
(B) 2
(C) 3
(D) Multiple
Answer:
(A) 1
Explanation:
A table can have only one primary key.
Question 12.
What will be the output of the following code : [1]
162//55 + 78%4 + 12**2
(A) 149
(B) 147
(C) 142
(D) 148
Answer:
(D) 148
Explanation:
162//55 + 78%4 + 12**2
= 2 + 2 + 144
= 148
Question 13.
Which of the following is not an example of robotics? [1]
(A) Sophia
(B) Drone
(C) CRAY
(D) Both A & B
Answer:
(C) CRAY
Question 14.
A key that links multiple tables is called? [1]
(A) Foreign key
(B) Primary key
(C) Candidate key
(D) Alternate key
Answer:
(A) Foreign key
Explanation:
A foreign key is a column or set of columns that allow us to establish a referential link between the data in two tables.
Question 15.
Which of the following can be used as valid variable identifiers in python and why? [1]
(A) Total
(B) > sumNum
(C) lQuestion
(D) Addition-2
Answer:
(A) Total
Explanation:
An identifier cannot begin with a special symbol and also it can’t be a keyword.
Question 16.
…………. is designed to solve a specific problem or to do a specific task. [1]
(A) Application Software
(B) System Software
(C) Utility Software
(D) User
Answer:
(A) Application Software
Explanation:
An application program (application or app for short) is a computer program designed to carry out a specific task other than one relating to the operation of the computer itself, typically to be used by end users.
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.
Question 17.
Assertion (A): A computer can process all instructions that are programmed in it and can is superior to humans in executing them.
Reason (R): Human beings can think and program, the machine cannot think. [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
Answer:
(B) Both A and R are true but R is NOT the correct explanation of A
Question 18.
Assertion (A): Operator is a type of Token.
Reason (R): Identifier starts with alphabet or underscore. [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
Answer:
(B) Both A and R are true but R is NOT the correct explanation of A
Section-B
Section B consists of 7 questions of 2 marks each.
Question 19.
Write the advantage and disadvantage of script mode. [2]
OR
Differentiate between interactive mode and script mode.
Answer:
Advantage : Editing your script is easier in script mode.
Disadvantage : Before execution of the code, it must be saved as a file.
OR
Differences between interactive mode and script mode are as:
Interactive Mode | Script Mode |
In interactive mode, the result is returned immediately after pressing the Enter key. | In script mode, a file must be created and saved before executing the code to get results. |
You are not provided with direct way of editing your code | You are provided with a direct way of editing your code. |
Question 20.
Write the following mathematical equation as Python expressions.[2]
(i) 3x3+ 4x2 + 5x + 7
(ii) Y = \(\frac{a+b+c}{3}\)
Answer:
(i) 3* (x**3) + 4*(x**2) + 5*x + 7)
(ii) y = (a + b + c)/3
Question 21.
What is the original purpose of SQL? [2]
Answer:
(A) to specify the syntax and semantics of data definition language
(B) To specify the syntax and semantics of data manipulation language
(C) To define the data structures
Question 22.
Give the output of the following with justification : [2]
x = 3
x + = x – x
print (x)
Answer:
Output: 3
Working: x = 3
x = x + (x – x) = 3 + (3-3) = 3
Question 23.
What is a public cloud? Give few examples of Public cloud. [2]
Answer:
Public cloud refers to a common cloud service made available to multiple subscribers.
Examples of public cloud are : Microsoft Azure, Google drive, Amazon cloud Drive, icloud.
Question 24.
Write a code in python to input a list of names from the user and display the names whose length is more than 5. [2]
Answer:
Lstn=eval(input("Enter names:")) for n in Lstn: if len(n) > 5: print(n) count+ = 1 print(No. of names of length more than 5 is :",count)
Question 25.
What are Python data types? [2]
Answer:
Python data types are used to define the types of a variable. Any values that are represented in quotes (double or single) are string data type. Number without decimal point is integer data type.
Python has 5 built-in core data types as
(i) Numbers
(ii) String
(iii) List
(iv) Tuple
(v) Dictionary
Section-C
Section C consists of 5 questions of 3 marks each.
Question 26.
Consider the table Accessories given below and write SQL queries: [3]
(i) Display name and price of all accessories in ascending order of their price.
(ii) To display names of accessories whose name ends with “d” and price is above 1000.
(iii) To increase the price of accessories by 200 whose name has “b” somewhere in between.
Answer:
SELECT Name, Price
FROM ACCESSORIES
ORDER BY Price;
(i) Select Name,Price from Accessories order by price;
(ii) Select Name from Accessories where Name like “%d” and price >1000;
(iii) Update Accessories set price=price+200 where name like “%b%”;
OR
Write queries with respect to the table Hospital given below :
(i) Display details of “Ortho” department patient in descending order of names.
(ii) Add a new column Docname varchar(20) to the table.
(iii) Delete records of patients whose name starts with “A”
Answer:
(i) Select * from hospital where Dept=”Ortho” order by Pname desc;
(ii) Alter table Hospital Add Docname varchar(20);
(iii) Delete from hospital where Pname like “A%”;
Question 27.
What will be the output of the following statements? [3]
(i) list1 = [12,32,65,26,80,10]
list1.sort( )
print (list1)
Answer:
[10,12,26, 32,65,80]
(ii) list1 = [1,2,3,4,5]
list1 [len (list1) -1]
Answer:
5
(iii) list1 = [1,2,3,4,5,6,7,8,9,10]
list1 [::-2]
list1 1:3] + list1 [3:]
Answer:
[10,8,6,4,2]
[1,2, 3,4,5, 6, 7,8,9,10]
Question 28.
Differentiate Alter and Update commands in SQL. [3]
Answer:
Alter | Update |
1. It belongs to DDL category | 1. It belongs to DML category |
2. It changes the structure of the table | 2. It modifies data of the table. |
3. Columns can be added, modified, deleted etc. | 3. Data can be changed, updated with values and expressions. |
Question 29.
Explain the use order by clause. [3]
OR
Write most appropriate data types for the following columns of a Book table in a database storing data of books.
(A) Bookname
(B) Date of publication
(C) Price
Answer:
The order by clause is used to arrange the records in ascending or descending order. Data present in a table can be arranged as per requirement on a specific field in ascending or descending order. The default is ascending order. To arrange in descending order the DESC clause is to be used. To arrange in ascending order ASC may be used.
Example ” Select * from Employee order by EMP_ SALARY DESC;”
(A) The above command arranges the records in descending order of salary.
OR
(A) Varchar
(B) Date
(C) Float/Double
Question 30.
Write a program to input Roll and name of as many students and create a dictionary from the details entered. Each entry should have roll as key and name as value. Also display the dictionary. [3]
Answer:
Studict = { } ans='y' while ans= ='y': r=input("Enter Roll:") n=input("Enter name :") Studict[r]=n ans=input("Add more(y/n)") print(Studict)
Section-D
Section D consists of 2 questions of 4 marks each.
Question 31.
Write SQL queries for the table given below:
(i) Display Name and SID of “Male” customers.
(ii) Display details of customers of NORTH area whose name ends with “A”
(iii) Update the table to change AREA to SOUTH for all FEMALE customers
(iv) Remove records of customers having Sil) 104.
Answer:
(i) Select Cname, SID from Customer where ‘Gender=”MALE”;
(ii) Select * from Customer where Area=”NORTH” and Cname like “%A”;
(iii) Update Customer Set AREA=”SOUTH” where gender=”FEMALE”;
(iv) Delete from customer where SID=104;
Question 32.
(i) What will be the output for the following Python statement?
L = [10, 20, 30, 40, 50]
L = L + 5
Print(L)
Answer:
Error
(ii) What will be the output of the following python code?
L =[10, 20] L1 = [30, 40] L2 = [50,601 L. append (L1) L. extend(L2) Print(L)
Answer:
[10,20, [30,40], 50,60]
(iii) Find the output
>>>11 = [1, 2, 3, 4]
>>>12= [2, 3, 4, 5]
>>>11 > 12
OR(Option for iii only)
Predict output of the following:
L = [10,12,2,22,19,40]
L[2] = 14
L.insert(3, 11)
del L[4:5]
print(L)
Answer:
False
OR(Option for iii only)
[10,12,14,11,19,40]]
Section-E
Section E consists of 3 questions of 5 marks each.
Question 33.
Write SQL query for the questions that follow based on given table Worker [5]
(i) To display Name and joining date of workers whose salary is greater than 10000.
(ii) To display details of those workers whose name started with ‘N’.
(iii) To display all workers details from worker table order by Name ascending.
(iv) To display Name and Salary of those workers who work in ‘HR’ or ‘Admin Department.
(v) To display the total number of workers who work in Accountant department.
Answer:
(i) SELECT Name, joining_Date FROM Workers WHERE Salary > 10000;
(ii) SELECT * FROM workers WHERE Name LIKE ‘N%’;
(iii) SELECT * FROM worker ORDER BY Name ASC;
(iv) SELECT Name, Salary FROM Worker WHERE Department IN (‘HR’, Admin’);
(v) SELECT COUNT() FROM Worker WHERE Department = , ‘Accountant’;
OR
Consider the table Hospital storing details of patients as follows :
Write SQL commands for (i) – (v)
(i) To create the table with appropriate data types.
(ii) To display only the names and departments of patients of “ENT”.
(iii) To increase the charges of all departments by 20%.
(iv) lb add a new column Phone of type integer.
(v) Remove the entire table.
Answer:
(i) Create table Hospital(Patid char(5),Pname varchar(30),Dept varchar(20), charges int, Dtofadm Date);
(ii) Select Pname, Dept from Hospital where Dept=”ENT”;
(iii) Update Hospital set charges = charges + charges *0.2;
(iv) Alter table Hospital ADD Phone integer;
(v) Drop table Hospital;
Question 34.
What are the major components of a computer system? How do different components of a computer communicate with each other ? [5]
Answer:
The computer system comprises of the following major components:
(A) Processor
(B) Main Memory
(C) Buses
(D) ALU
(E) CU
(F) I/O Units
A computer system primarily comprises of different components such as central processing unit, input/output devices and memory unit. All these components function together as a single unit to deliver the desired result. Input devices send the data or information through keyboard, mouse, scanner, etc.
CPU transfers instructions and input data from main memory to registers.
Output unit sends the processed results to the user. Memory unit is responsible to store processed results on a temporary or permanent basis.
Question 35.
Write a program to input a sentence and using a list display the words that have even number of vowels. [5]
Answer:
sen= input("Enter sentence:") Lst=sen.split(' ') for wrd in Lst: for ch in wrd: if ch in 'aeiou' or ch in "AEIOU" : count+=1 if count%2==0: print(wrd) count=0
OR
Write a Python program to find the list of words that are longer than n from a given list of words.
Answer:
str=input("Enter a sentence:") n=int(input("Enter the highest length :") words = str.split(" ") for word in words: if len(word) > n: print(word)