Sample Paper 12 IP
Sample Paper 12 IP
SAMPLE PAPER
Class: XI
Time: 3 HOURS M.M.: 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 03 Long Answer type questions carrying 05 marks each.
7. Section E has 02 questions carrying 04 marks each. One internal choice is given in Q35 against part c
only.
8. All programming questions are to be answered using Python Language only.
Question 2. The superimposition of computer generated perceptual information over the existing
physical surroundings is called as ……… [1]
(A) Immersive Experiences (B) Virtual Reality
(C) Augmented Reality. (D) Machine Learning.
Answer: (C) Augmented Reality.
Explanation: The superimposition of computer generated perceptual information over the existing
physical surroundings is called as Augmented Reality (AR). It adds components of the digital world to
the physical world, along with the associated tactile and other sensory requirements, thereby making
the environment interactive and digitally manipulable.
Question 3. …………….. refers to a logical structure of a computer describing how its components are
connected to one another. [1]
(A) Functional system (B) Operational system (C) Computer organization (D) None of these
Answer: (C) Computer organization
Explanation: Computer organisation is a field which explains about structure and behaviour of digital
computers as seen by the user.
Page 1 of 10
Question 6. Example of Artificial Intelligence is : [1]
(A) Google Now (B) Cortana (C) Alexa (D) All of these
Answer: (D) All of these
Explanation: Apple’s Siri, Google Now, Amazon’s Alexa, and Microsoft’s Cortana are one of the main
examples of AI in everyday life.
Question 7. Which of the following is used to define a block of code in Python language? [1]
(A) Indentation (B) Key (C) Brackets (D) All of these
Answer: (A) Indentation
Explanation: In Python, to define a block of code we use indentation. Indentation refers to whitespaces
at the beginning of the line.
Question 9. Which operator is used to compare a value with a specified list of values? [1]
(A) IN (B) LIKE (C) BETWEEN (D) ALL
Answer: (A) IN
Explanation: IN operator selects values that match any value in a given list of values.
Question 11. To remove duplicate rows from the results of an SQL SELECT statement, the ……………
included. [1]
(A) UNIQUE (B) DISTINCT (C) ONLY (D) SINGLE
Answer: (B) DISTINCT
Explanation: The DISTINCT keyword is used after SELECT command, when you want to select only non-
repeated rows. Distinct keyword forces the query to discard any duplicate rows from the selected
column only.
Question 12. What will be the output of the following code : 2* *3* *2 + 625**0.5 + 7//2 [1]
(A) 542.50 (B) 540.0 (C) 539 (D) 541.0
Answer: (B) 540.0
Explanation:
2* 3**2 + 625**0.5 + 7//2 2**3**2+25.0+7//2 2**9+25.0+7//2 512 + 25.0 + 3 540.01
Question 13. The ……………. providers can offer different kinds of computing infrastructure, such as
servers, virtual machines (VM), storage and backup facility, network components, operating systems or
any other hardware or software. [1]
(A) SaaS (B) PaaS (C) IaaS (D) None of the these.
Answer: (C) IaaS
Explanation: Infrastructure as a service (IaaS) is a system of cloud computing that delivers virtualized
computing resources over the internet. IaaS is one of the three main categories of cloud computing
services, together with software as a service (SaaS) and platform as a service (PaaS).
Page 2 of 10
Question 14. Which of the following statements is correct regarding Alternate key : [1]
An Alternate key can be defined as:
(A) An attribute which is a primary key (B) An attribute which is not a primary key
(C) A candidate key (D) None of these
Answer: (B) An attribute which is not a primary key
Explanation: All the keys which did not become the primary Key are called alternate keys.
Question 16. The Boot sector files of the system are stored in which computer memory? [1]
(A) RAM (B) Cache (C) ROM (D) Register
Answer: (C) ROM
Explanation: ROM stores the program instructions required to initially boot the computer. It only allows
reading.
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): Computer use a number of special memory units called registers, which
are not considered as parts of the main memory.
Reason (R): All these registers have the common ability to receive the information, hold it temporarily
and to pass it on as directed by the control unit. [1]
(A) Both A and R are true and R is the correct explanation for A
(B) Both A and R are true and R is not the correct explanation for A
(C) A is True but R is False
(D) A is false but R is True
Answer: (A) Both A and R are true and R is the correct explanation for A
Question 18. Assertion (A): The low level control of an input/ output device is easier at the hardware
level.
Reason (R): It requires managing a set of concurrent events. [1]
(A) Both A and R are true and R is the correct explanation for A
(B) Both A and R are true and R is not the correct explanation for A
(C) A is True but R is False
(D) A is false but R is True
Answer: (D) A is false but R is True
Page 3 of 10
Question 20. Rahul wrote a code in Python. But when he tried to run the code, he got some errors. Find
out the error and help him. [2]
percent = ‘98’
Print {“WOW!!!”]
print (“I am very happy to got’, percent,%”)
print (‘“How much did you get ?”)
Answer: The correct code is
percent = 98
print (“WOW!!!”)
print (“I am very happy to got”, percent,”%”)
print (“How much did you get ?”)
Question 24. How can the members of a list accessed in Python ? [2]
Answer: To access members of a list, we can use indices or slicing to access multiple members at a time.
e.g., list1 =['physics', 'chemistry', 1997,2000]
list2 =[1,2,3,4, 5, 6, 7]
print ("list1 [0]:", list1[0])
print ("list2 [1:5]:", list2[1: 5])
Output:
list1[0]: physics
list2[1:5]:[2, 3, 4, 5]
Question 25. What is the main difference between ‘ BETWEEN’ and ‘ IN’ operators? [2]
Answer: ‘BETWEEN’ operator is used to display rows based on a range of values in a row whereas the
‘IN’ operator is used to check for values contained in a specific set of values.
Example of BETWEEN: SELECT * FROM Employee WHERE Emp_Code BETWEEN 101 AND 105;
Example of IN: SELECT * FROM Employee WHERE Emp_Code IN (101,105);
Page 4 of 10
Write MySQL queries for the following (table name is ITEM)
(i) Display the details of products whose price is more than 8000 arranged by Item_Name in
ascending order.
(ii) Increase the price of the item Television by 10%
(iii) Add a new column DtMfg of type date to store the date of manufacture of the products.
OR
Consider the following table with their fields. Employee(Ecode/Ename,Desig,Salary,Doj) [3]
(i) List the names, salary, PF, HRA, DA of all the employees in the Employee Table. HRA is 25% of
salary, DA is 10% of salary and PF is 5% of salary. The result should be in descending order of
ENAMES.
(ii) Using IN clause display details of employees whose designations are “Manager” or “Officer”
(iii) Modify the table to increase salary of all employees by 10%.
Answer:
(i) Select * from ITEM where Price > 8000 order by Item_Name;
(ii) Update ITEM set price = price +price*10/100 where Item_Name=”Television”;
(iii) Alter table ITEM ADD DtMfg Date;
OR
Answer:
(i) Select Ename,Salary,Salary *0.05 as “PF”, SALARY *0.25 as “HRA”, SALARY *0.10 as “DA” from
EMPLOYEE order by ENAME DESC;
(ii) Select*from EMPLOYEE where DESIG IN(“Manager” /’Officer”);
(iii) Update Employee set Salary=Salary + Salary*0.1;
Question 27. What will be the output of the following code? [3]
x,y = 4,6
z = x + y*2
x = 2*x + 3
y = x*y + 2
z = y*z + 10-x
print ("x =", x)
print ("y =", y)
print ("z =", z)
Answer: Output
x = 11
y = 68
z = 1087
Page 5 of 10
Question 29. Define the generally used data types in SQL. [3]
OR
Write the situations where you will use the IN, BETWEEN and LIKE clauses.
Answer: Data type indicates the type of data value that an attribute can have.
Commonly used data types are:
VARCHAR2 (SIZE): It is variable length characters string. It can hold 4000 bytes of characters.
CHAR (size): It specifies a fixed length characters string. Maximum size is 255.
VARCHAR(size): This data type is currently synonymous with VARCHAR2 datatype.
NUMERIC(P,S): It is used to store fixed or floating point numbers where P-Precision or total
number of digits in range 1 to 38. S-Scale or numbers of digits to right of decimal point.
LONG: It stores variable length character strings containing up to 2 Giga bytes.
DATE: It is used to store date information. Default ( format is YYYY-MM-DD.
OR
Answer:
The IN clause is used in place of multiple OR clauses. The IN clause can replace multiple Ors joining
the conditions in a query . This makes the command smaller.
Example : To display the employee details for employees working in departments “Saled”,”Purc”
and “IT” the command with and without IN will be : Select * from Employee where dept=”Sales”
or dept=”Purc” or dept=”IT”;
Select * from Employee where dept IN (“Sales” /’Pure”,”IT)”;
The BETWEEN clause is used to match ranges in a query. The > = and < = ranges can be matched
using the BETWEEN clause.
Example : To display the details of employees getting salary between 50000 and 90000, the
command with and without the BETWEEN clause will be :
Select * from Employee where salary >=50000 and salary < =90000;
Select * from Employee where salary BETWEEN 50000 and 90000;
The LIKE clause is used in places where a pattern is to be matched in a query, that is where partial
information about the match is provided. It uses two wild cards * and _ to match missing characters.
Example : (A) To display the details of employees whose name begins with “S” the command will
be : Select * from Employee where name like “S%”;
Example : (B) To display details of employees whose department ends with “S” the command will
be : Select * from Employee where dept like “%S”;
Question 30. Write a program to find the sum of all elements in a list. [3]
Answer:
list=[ ]
sum=0
number = int (input('How many numbers:'))
for i in range (number):
num = int (input('Enter number'))
list.append (num)
for i in range (0, number):
sum + = list[i]
print ("Sum of elements in a given Hst is:", sum)
Page 6 of 10
Section D consists of 2 questions of 4 marks each.
Question 31. Consider the following table Student and write command in SQL from (i) to (iv). [4]
Roll No (Primary Key) Name (Not Null) Age (Not Null) Percentage City
2001 Abhishek Singh 20 80 Agra
2002 Amar Kumar 19 75 Mathura
2003 Chetan Shukla 21 81 Agra
2004 Deepak Nagar 19 70 Agra
2005 Raghu Yadav 19 85 Lucknow
(i) Display the names of students who live in Agra and whose percentage is more than 75.
(ii) Display the details of those students whose names start with alphabet A’.
(iii) Display the names of students who don’t belong to Lucknow.
(iv) Display the number of those students whose age is less than 20.
Answer:
(i) SELECT Name FROM Student WHERE City = ‘Agra’ AND Percentage > 75;
(ii) SELECT *FROM Student WHERE Name LIKE ‘A%’;
(iii) SELECT Name FROM Student WHERE City NOT IN (‘Lucknow’);
(iv) Select count(*) from Student where age < 20;
Question 32. What will be the output of the following statements? [4]
(i) list1 =[12,32,65,26,80,10]
list1. sort( )
print (list1)
(ii) list1 =[12,32,65,26,80,10]
sorted(list1)
print (list1)
(iii) list1 =[1,2,3,4,5,6, 7,8,9,10]
print(list1[ : : -2])
print(list1[ : 3] + list1[ 3 : ])
OR (Option for (iii) only)
What will be the output of the statement:
list1 = [1,2,3,4, 5]
print(list1[len (list1)-1])
print(len (list1)-1)
Answer:
(i) [10, 12, 26, 32, 65, 80]
(ii) [12, 32, 65, 26, 80, 10]
(iii) [10, 8, 6, 4, 2]
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
OR (Option for (iii) only)
5
4
Page 7 of 10
Section E consists of 3 questions of 5 marks each.
Question 33. Write the SQL commands for the questions from (i) to (v) on the basis of table
Employee. [5]
(i) Display Employee Name and Salary of those employees whose salary is greater than or equal to
22000?
(ii) Display details of employees those are not getting commission.
(iii) Display employee name and salary of those employees who have their salary in range of 2000 to
4000?
(iv) Display the name, profile and salary of employee(s) who doesn’t have manager?
(v) Display the name of employee whose name contains “A” as fourth alphabet.
OR
Write SQL queries for the table given below :
Page 8 of 10
Question 34. Explain Read Only Memory (ROM) and its types. [5]
Answer: Read Only Memory (ROM) does not lose its contents when the power is switched off. ROM is
also known as non-volatile or permanent storage. ROM can have data and instruction written to it only
one time. Once a ROM chip is programmed at the time of manufacturing, it cannot be reprogrammed or
rewritten.
Three categories of ROM are as follow:
(i) Programmable ROM (PROM): It is also nonvolatile in nature once a PROM has been programmed,
its content can never be changed. It is one time programmable device. These types of memories
are found in video game consoles, mobile phones, implantable medical devices and high
definition multimedia interface.
(ii) Erasable Programmable ROM (EPROM): It is similar to PROM, but it can be eased by exposure to
strong ultraviolet light. Then rewritten so it is also known as Ultraviolet Erasable Programmable
ROM (UVEPROM).
(iii) Electrically Erasable Programmable ROM (EEPROM): It is similar to EPROM, but it can be erased
electrically then re-written electrically and the burning process is reversible by exposure to
electric pulses. It is the most flexible type of ROM and is now commonly used for holding BIOS.
Question 35. Write a program to find the largest and the second largest elements in a given list of
elements. [5]
OR
Write a program to input your friend’s names and their phone numbers and store them in the dictionary
as the key value pair. Perform the following operations on the dictionary:
(i) Display the name and phone number for all your friends.
(ii) Add a new key value pair in this dictionary and display the modified dictionary.
(iii) Delete a particular friend from the dictionary.
(iv) Modify the phone number of an existing friend.
(v) Check if a friend is present in the dictionary or not.
(vi) Display the dictionary in sorted order of names.
Answer:
list1 =[ ]
n=int(input("Enter number of elements : "))
for i in range (1, n+1):
b=int(input("Enter element %d : " %i))
list1.append(b)
list1.sort( )
print("First largest element:", list1[n-1])
print("Second largest element:", list1[n-2])
OR
Answer:
dict = { }
n = int(input("Enter a number of friends you want to add : '))
for i in range (n):
name = input ("Enter your friend's name %d : "%i)
phnum = input ("Enter his phone number %d : "%i)
dict[name] = phnum
(i) for name in dict:
print (name, '\t\t', dict([name])
(ii) name = input ("Enter new friend's name : ")
Page 9 of 10
phnum = input ('Enter his phone number : ")
dict[name] = phnum
(iii) name = input ('Enter friend's name to delete : ')
if name in dict:
del dict[name]
print ("Deleted')
else:
print ("Friend not found")
(iv) name = input ("Enter friend's name to modify')
if name in dict:
phnum = input ("Enter new number : ")
dict[name] = phnum
else:
print ("Edited')
(v) name = input ("Enter name to check availability)
if name in dict:
print (name, "exists")
else:
print ('Record not found')
(vi) for i in sorted (dict.keys( )):
print (i, "\t\t\t" dict[i])
print ('\n\n')
Page 10 of 10