Students must start practicing the questions from CBSE Sample Papers for Class 11 Informatics Practices with Solutions Set 4 are designed as per the revised syllabus.
CBSE Sample Papers for Class 11 Informatics Practices Set 4 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.
……………….. Converts the output in binary form to human readable form.
(A) Input devices
(B) Output devices
(C) Stbrage device
(D) None of these
Answer:
(B) Output devices
Question 2.
A roadblock to the widespread use of AR and VR is
(A) Cost
(B) User readiness
(C) Lack of development tools
(D) All of the above
Answer:
(D) All of the above
Explanation:
Cost, user readiness and lack of development tools are the roadblock to the widespread use of AR and VR is.
Question 3.
CRT is a type of:
(A) Printer
(B) Monitor
(C) Scanner
(D) Plotter
Answer:
Explanation: Cathode ray tube is a type of monitor technology.
Question 4.
Which data type of SQL stores character type data?
(A) char
(B) varchar
(C) float
(D) Both (A) and (B)
Answer:
(D) Both (A) and (B)
Explanation: char and varchar are data types that store characters and strings.
Question 5.
The command opens an existing database.
(A) Open
(B) Use
(C) Create
(D) None of these
Answer:
(B) Use
Explanation:
Once a database is created it can be opened by Use command.
Question 6.
Virtual Reality (VR) is a
(A) One
(B) Two
(C) Three
(D) N-dimensional
Answer:
(C) Three
Explanation:
Everything that we experience in our reality is perceived through our senses. From this came the idea that if we can present our senses with madeup or non-real information, our perception of reality would also alter in response to that Virtual Reality (VR) is a three-dimensional, computer generated situation that simulates the real world.
Question 7.
Which of the following is true for variable names in Python?
(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 above
Answer:
(B) unlimited length
Explanation: Variable names can be of any length.
Question 8.
The clause used to check NULL values is :
(A) IS NULL
(B) IS NOT NULL
(C) Both A and B
(D) NONE OF THESE
Answer:
(A) IS NULL
Explanation: The IS NULL clause checks for NULL values in a field.
Question 9.
The …………… operator is used for pattern matching.
(A) PATTERN
(B) LIKE
(C) MATCH
(D) LOOKSLIKE
Answer:
(B) LIKE
Explanation: The LIKE clause is used to match patterns in a field.
Question 10.
Choose the one with highest priority in an expression :
(A) *
(B) +
(C) **
(D) %
Answer:
(C) **
Explanation: The exponentiation operator ** has the highest priority after parenthesis.
Question 11.
Which computer memory chip allows simultaneous both read and write operations?
(A) EEPROM
(B) RAM
(C) ROM
(D) PROM
Answer:
(B) RAM
Explanation: RAM is a volatile chip memory that performs both read and write operations. That’s why, it is also called read-write memory (called RWM).
Question 12.
Find the output of the given Python program?
a = 25 if a < 15: print(Hi") if a <=30: print("Hello") else: print("Know Program")
(A) Hi
(B) Hello
(C) Know Program
(D) Compiled Successfully, No Output
Answer:
(B) Hello
Explanation: Here 25 < 15 => false; therefore, the if-block will not be executed. Next, 25 <= 30, condition becomes true therefore if-block will be executed.
Question 13.
A game based on which animated franchise propelled AR into the mainstream in recent years?
(A) Legend of Zelda
(B) Pokemon Go
(C) Super Mario
(D) Sonic the Hedgehog
Answer:
(B) Pokemon Go
Explanation: Pokemon Go is the game based on which animated franchise propelled AR into the mainstream in recent years.
Question 14.
The clause used to specify a condition in a query is :
(A) Match
(B) Whose
(C) Where
(D) None of these
Answer:
(C) Where
Explanation: The Where clause is used to specify a condition in a query.
Question 15.
The method that displays both the keys and values of a dictionary is :
(A) keys( )
(B) values( )
(C) items( )
(D) update( )
Answer:
(C) items( )
Explanation: The items() method returns both the keys and values of a dictionary.
Question 16.
Which of the following is not a memory device?
(A) DDR
(B) HDD
(C) Blue ray disc
(D) All are memory devices
Answer:
(D) All are memory devices
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): CPU is also known as brain of computer.
Reason (R): CPU receives a data from the user as input, interprets and executes it and presents the output as information.
(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): Size of lists can be changed.
Reason (R): Data of lists is also mutable.
(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:
(B) Both A and R are true but R is NOT the correct explanation of A
Explanation: A list in Python is mutable, that is, it allows us to change its value once it is created.
Section B
Section B Consists of 7 questions of 2 marks each .
Question 19.
Write the output of the following code
a, b = 4, 8 a, b = b, 4*2 print (a, b)
Answer:
8, 8
OR
What are mutable and immutable data types?
Answer:
(i) Mutable objects are those that allow and support changes in their contents. The mutable type includes list and dictionaries. It means that no new value object is created rather changes are made in the same value object.
(ii) Immutable objects are those that can never change their value. In Python, integers, floating point numbers, Booleans, strings and tuples are immutable.
Question 20.
What will be the output of the following expressions when :
a = 10, b = 56, c = 89, name = ‘Hello’, Name = ‘hello’
(i) print(a < b)
(ii) print (name < Name )
(iii) print (a <b <c)
(iv) print (a < b > c)
Answer:
(i) True
(ii) True
(iii) True
(iv) False
Question 21.
Help Susmita in selecting the proper SQL commands in the following cases : [2]
(i) To increase the width of a column
(ii) To remove few tuples
Answer:
(i) Alter table Modify
(ii) Delete
Question 22.
What will be the output of the following code ?
x- = 5 b = 7 c = - 4 d = - 20 print (x +b*2 + c - d) print ((x + b + c) > (b + c - d)) print (c + d*2 + 20)
Answer:
35
False
– 24
Question 23.
How many types of grid are there? Explain them.
Answer:
Grid can be of two types:
(i) Data grid, used to manage large and distributed data having the required multi-user access.
(ii) Processor grid, where processing is moved from one PC to another as need or a large task is divided into sub tasks and allotted to various nodes for parallel processing
Question 24.
Write a Phthon program to calculate the area of triangle on the following formula
S = (a + b + c)/2
area = \(\sqrt{s(s -a)*(s-b)*(s-c))}\)
Answer:
Python code :
a = int(input (“Enter the first side:”)) b = int(input (“Enter the second side:”)) c = int(input (“Enter the third side:”)) s = (a + b + c)/2 area = ((s*(s - a)*(s - b)* (s - c))**0.5) print (“The area of triangle:”,area)
Question 25.
What is the error in following Python program with one statement ?
print (“My favourite subject is “, subject)
Answer:
Given statement is trying to print the value of subject which is undefined variable name. Before printing the value of subject, you must define the variable subject.
Correct statement is
subject = “Computer“ print (“My favourite subject is“, subject) Output: My favourite subject is Computer
Section C
Section C Consists of 5 questions of 3 marks each
Question 26.
Assuming the following table ITEM,
Table: ITEM
Item_Code | Item_Name | Price |
100 | Refrigerator | 9000 |
101 | Television | 8000 |
102 | Computer | 12000 |
103 | Washing Machine | 7000 |
Write MySQL queries for the following
(i) Display the details of items whose price is more than 8000
(ii) Increase the price of the item Television by 10%
(iii) Write the query to add the 1st record
Answer:
(i) Select * from ITEM where Price >8000 ;
(ii) Update ITEM set price = price +price*10/100 where Item_Name=”Television”;
(iii) Insert into ITEM values(100,”Refrigerator”,9000);
OR
Table : ITEM
Item_Code | Item_Name | Price |
100 | Refrigerator | 9000 |
101 | Television | 8000 |
102 | Computer | 12000 |
103 | Washing Machine | 7000 |
With respect to the table ITEM given above , write SQL queries for the following :
(i) Add a new column DtMfg of type date to store the date of manufacture of the items.
(ii) Increase the width of Item_Name column to varchar(50)
(iii) Remove the data of items whose price is above 10000.
Answer:
(i) Alter table ITEM ADD DtMfg Date;
(ii)Alter table ITEM MODIFY Item_Name varchar(50);
(iii) Delete from ITEM where Price>10000;
Question 27.
How to update and delete elements from the list?
Answer:
Updating elements to a list: Lists are mutable which can be modified. We can update or change an element in list using index number.
Syntax list_name [index]=value
e.g.,
>>> list = [45, 33, 12, 45] >>>list[1]=49 >>>list [45, 49, 12, 45]
Deleting elements from a list Elements can be deleted from a list. For this, del keyword is used in Python.
Syntax del list_name[indexNumber]
del list_name[start:stop]
e.g.,
>>> list=[45, 33, 12, 45, 62, 73, 93] >>>del list [2] >>>list [45, 33, 45, 62, 73, 93] >>>del list [1:4] >>>list [45, 73, 93]
Question 28.
Explain the use of LIKE operator in SQL.
Answer:
LIKE operator is used to search a specified pattern in a column. It is useful when you want to search rows to match a specific pattern, or when you do not know the entire value. The SQL LIKE clause is used to compare a value to similar values using wildcards operators.
We describe patterns by using two special wildcard operators, given below:
(i) The Percent Sign (%) is used to match any substring.
(ii) The Underscore (_) is used to match any character.
The symbols can also be used in combinations.
Question 29.
Give commands/clauses/operators as required in the following cases :
(i) To match a range of values
(ii) To check for blank values
(iii) To check for existence of a table or database
Answer:
(i) Between clause
(ii) IS NULL
(iii) IF EXISTS
OR
Explain primary key with an example.
Answer:
The primary key of a relation can said to be a minimal super key. The field or group of field which forms the unique identifier for a table is called the table‘s primary key. The primary key uniquely identifies each record in the table and is never the same for two records. Primary key should be chosen such that its attributes are never or very rarely changed. For instance, the address field of a person should not be part of the primary key, since it is likely to change. emp_code, on the other hand, is guaranteed to never change, till he/ she is in the organization .emp_code can be a primary key.
Question 30.
Write a program in python that inputs a number and checks whether it is a special number or not. [A special number is one whose sum of digits of the square = The original number Example 9 = 81 = 8+1=9] [3]
Answer:
num = 0 sq = 0 sum = 0 num = int(input(“Enter a number :”)) sq = num**2 while sq > 0: sum = sum + sq%10 sq = sq //10 if sum == num : print(“Special number”) else : print(“Not a Special number”)
Section D
Section D Consists of 2 questions of 4 marks each
Question 31.
With respect to the table “Toys” write SQL commands to perform the following:
Table : Toys
ToyID | Toyname | Price | Type |
T01 | Doll | 520 | Girls |
T02 | Video Game | 200 | Boys |
T03 | Gun | 1600 | Boys |
T04 | Anabelle | 1000 | Girls |
T05 | Hot wheels | 100 | Boys |
To add a record “T06,Toy Train,900,Boys” into the table
(ii) To display toyname and price for all toys
(iii) To display only toynames whose price is greater than 1000
(iv) To add a column “Quantity” of type int to store quantities of toys
Answer:
(i) Insert into Toys values(“T06”,”Toy Train”,900,”Boys”);
(ii) Select Toyname, Price from Toys;
(iii) Select Toyname from Toys where price > 1000;
(iv) Alter table Toys ADD Quantity integer;
Question 32.
Write the use of following dictionary methods .
(i) Update
(ii) Items
(iii) Write a program which will find all such numbers which are divisible by 8 but are not a multiple of 5, between 500 and 1000 (both included).
OR( For part iii only)
Employee = {'Name': 'Rakesh', 'Dept': 'Clerk'/Salary': 25000} for key in Employee: print (key,Employee [key])
Answer:
The update method of a dictionary updates the
values of a dictionary by other.
(i) The items() method dislays both the keys and
values of a dictionary.
List = [ ] For i in range (500, 1001): If (i% 8 = = 0) and (i% 5! = 0): List.append (i) Print (list)
OR (For part c only)
Name : Rakesh
Dept : Clerk
Salary : 25000
Section E
Section E Consists of 3 questions of 5 marks each
Question 33.
With respect to the following table “BOOK” and write SQL queries : [5]
(i) Display details of books published before year 2000
(ii) Display names and publishers of books whose price is less than 1000
(iii) Display Names of books who do not have a Date of publication
(iv) Increase price of all books by 200.
(v) Display the details of table Book.
Answer:
(i) Select * from Book where DtofPub < ’2000-01-01’ ;
(ii) Select Bname,Publisher from Book where price < 1000;
(iii) Select Bname from Book where DtofPub IS NULL;
(iv) Update Book set price = price+200;
SELECT *FROM BOOK;
OR
Write SQL queries with respect to the Emp table given below :
Table : Emp
(i) Display name and department of employees whose name begins with” S”
(ii) Display details of employees whose designation ends with “R”
(iii) Display details of employees whose name has 1st letter “P” and 3rd letter ” i”
(iv) Display name,dept and salary of employees whose dept name ends with “s”
(v) Display the field structure of the table
Answer:
(i) Select Ename,dept from Emp where Ename like “S%”;
(ii) Select * from emp where desig like “%r”;
(iii) Select * from emp where ename like “P_i%”;
(iv) Select Ename, dept , sal from emp where dept like “%s”;
(v) Describe Emp;
Question 34.
What is the need of RAM ? How does it differ from ROM ? [5]
Answer:
RAM (Random Access Memory) improves the performance of a computer system by providing a way to access the data and files faster from active log files (RAM data) rather than to retrieve it from the far larger hard drive. RAM is accessed directly by the CPU so it is a fast memory.
Differences between RAM and ROM are as follows:
RAM | ROM |
(i) RAM stands for Random Access Memory. | (i) ROM stands for Read Only Memory. |
(ii) It can be read from as well as written to. | (ii) It can only be used for reading. |
Question 35.
Consider the table Trip given below:
Based on the table write SQL queries for the following:
(i) To display NO, NAME, TDATE from the table TRIE
(ii) To display the NAME of the drivers from the table TRIE who are travelling by transport vehicle with code 101 or 103.
(iii) To display the NO and NAME of those drivers from the table TRIE who travelled between ‘2015-02-10’ and ‘2015-04-01’.
(iv) To display the name of drivers who travelled more than 200 km.
(v) To display the records of table trip.
Answer:
(i) Select No, Name, TDATE from Trip;
(ii) SELECT NAME FROM TRIP WHERE TCODE = 101 OR TCODE = 103;
(iii) SELECT NO, NAME FROM TRIP WHERE TDATE> ‘2015-02-10’ and TDATE < ‘2015-04-01’;
(iv) SELECT NAME FROM TRIP WHERE KM > 200;
(v) SELECT * FROM TRIP;
OR
Write the output of given queries based on table STUDENT:
(i) SELECT NAME,GENDER FROM STUDENT WHERE CITY=”Delhi”;
(ii) SELECT NAME FROM STUDENT WHERE MARKS>500;
(iii) SELECT CITY FROM STUDENT WHERE NAME LIKE “T%”;
(iv) SELECT NAME, CITY FROM STUDENT WHERE RollNo = 8;
(v) SELECT CLASS, CITY FROM STUDENT WHERE NAME LIKE “%h”;
Answer:
(i) Sonal F
Store M
(ii) Nanda
(iii) Mumbai
(iv) Nishant – Moscow
(v) XII – Mumbai