Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

RETEST / IMPROVEMENT EXAM

TERM II EXAMINATION
CLASS - XI
SESSION - 2023-24
INFORMATICS PRACTICES (065)

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 m arks 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.
8. All programming questions are to be answered using Python Language only.
________________________________________________________________________________________
Section - A (18 x 1 = 18)

Q1. Identify the correct identifier from the following: (1)


a) 1_Number
b)
c)
d)
&&List1
List_1
@List_1
✔️
Q2. If the value of a=10 and b=15, then a*=b will assign _________ to (1)
the variable a.
a)
b)
c)
25
150
100
✔️
d) 225

Q3. __________ are used to perform maintenance functions in computer systems . (1)
a) Application Software
b)
c)
d)
System Software
Utility Software
None of these
✔️
Q4. 2096 MB is equivalent to ___________ GB (1)
a) 1 GB and 100 MB
b)
c)
d)
1 TB and 100 MB
2 GB and 48 MB
1 B and 48 GB
✔️
Q5. STR=”RGBCOLOR” (1)
colors=list(STR)
How do we delete ‘B’ in given List colors?
a) del colors[2]
b) colors.remove("B")
c)
d)
colors.pop(2)
All of these ✔️

Page 1
Q6. ______ command is used to remove a column from the table in MySQL. (1)
a)
b)
c)
UPDATE
ALTER
DROP
✔️
d) DELETE

Q7. Ravi wants to generate a list with following values: [-15,-13,-11,-9,-7] (1)
Identify the right python statement for the same.
a) list(range(-15,-8,2))
b)
c)
d)
✔️
list(range(-15,-8,-2))
list(range(-15,-6,-2))
list(range(-15,-6,2))

Q8. Ravish is working with a table employee. He wants to insert a record in the table. Help him to (1)
complete the query for this task.
insert into employee __________(‘E001’,’Amit’,83000);
a)
b)
c)
table
values
value
✔️
d) field

Q9 Select Name, Dept, Salary*12 as “Annual Salary” from EMP; (1)


What is “Annual Salary” in the above statement?
a)
b)
c)
Table Alias
Column Alias
Header
✔️
d) None of These

Q10. Which Python mode allows you to save code/instructions in program file mode? (1)
a)
b)
c)
Interactive Mode
Script Mode
Program Mode
✔️
d) Inline mode

Q11. Rajveer wants to display records of selected employees from the emp table, which clause needs (1)
to be added in the query to achieve this.
a) DISTINCT
b)
c)
d)
ORDER BY
WHERE ✔️
None of these

Q12. Consider a table Book having two fields as mentioned below: (1)
Field Type
BookID varchar(30)
BookAuthor char(30)
If in a record , the value stored in BookID is ‘B10113’ and Book Author is ‘James’, then BookID
and BookAuthor will consume _______ and ________ characters space respectively.
a) 7,5
b) 6,5
c)
d) ✔️
30,30
6,30

Q13. Which of the following is not an input device? (1)


a)
b)
c)
Plotter✔️
Microphone

Keyboard
d) Touch Sensor

Page 2
Q14. Out of given data types, which one is a sequential data type in python? (1)
a)
b)
c)
string✔️
integer

boolean
d) dictionary

Q15. In the context of revolutionizing the shopping experience through a mobile application, which (1)
technology offers the capability to immerse users in simulated environments, potentially
transforming their interaction with products and services?
a)
b)
c)
Virtual Reality (VR) ✔️
Augmented Reality (AR)

Internet of Things (IoT)


d) Web of Things (WoT)

Q16. What type of cloud computing model is suitable for a company seeking a provider offering basic (1)
services like virtual server provisioning and on-demand storage, allowing for the deployment and
operation of custom applications?
a)
b)
Infrastructure as a Service (IaaS)
Platform as a Service (PaaS)
✔️
c) Software as a Service (SaaS)
d) Function as a Service (FaaS)

Question 17 and 18 are ASSERTION AND REASONING based questions. Mark correct choice as
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

Q17. Assertion: The modulo operator (%) returns the remainder of a division operation. (1)
Reasoning: The modulo operator is primarily used for integer division.
iii. A is True but R is False

Q18. Assertion: The primary key ensures data integrity and facilitates efficient data retrieval operations. (1)
Reasoning: A primary key uniquely identifies each record in a database table
i. Both A and R are true and R is the correct explanation for A
.

Section - B (7 x 2 = 14)

Q19. Arpita, a data analyst, accidentally deleted crucial data from her company's database. Is it (2)
possible for Arpita to recover the deleted data? Justify your answer.
Yes, it's possible for Arpita to recover the deleted data if the company has backups or
employs data recovery techniques. Otherwise, the data may be permanently lost.
OR
Enumerate the utilization or purposes of the following memory devices:
i. Random Access Memory
ii. Read Only Memory
Random Access Memory (RAM) is used for temporary storage of data and program
instructions while a computer is running.
Read Only Memory (ROM) contains firmware and boot-up instructions essential for the
computer's operation.

Q20. Evaluate the following expression: (2)


i. 4/3+4**2-7//3
ii. not False or False and not True

Page 3
15.3333
True

Q21. Convert the following program into a for loop without affecting the output. (2)
count=0
while count<10:
print(“Hello”)
print(“Good Bye!”)
count=count+1
for count in range(10):
print("Hello")
print("Good Bye!")

Q22. What will be the output of the following code? (2)


for k in range(-10,0,2):
print(k)
print(x‐y)

Error (as value of x and y is not defined)

Q23. Consider the following table BANK : (2)

What is the degree and cardinality of the above mentioned table?


Degree : 5 Cardinality: 5
OR
Differentiate between Candidate Key and Alternate Key in SQL.
A candidate key uniquely identifies each record in a database table and can become the
primary key. An alternate key, while also unique, isn't chosen as the primary key and can
serve as an alternative identifier.

Q24. Categorize the following commands as DDL or DML: (2)


INSERT, UPDATE, ALTER, DROP
INSERT and UPDATE are DML (Data Manipulation Language) commands used to
manipulate data in existing tables. ALTER and DROP are DDL (Data Definition Language)
commands used to modify or delete database objects such as tables, indexes, or views.

Q25. The Doc_name column of a table HOSPITAL is given below: (2)

Write the output of the following queries:

Page 4
i. SELECT Doc_name FROM HOSPITAL WHERE Doc_name LIKE ‘_ _ i %’ ;
Avinash
ii. SELECT Doc_name FROM HOSPITAL WHERE Doc_name LIKE ‘% r_ _’ ;
Hariharan

Section - C (5 x 3 = 15)

Q26. Rewrite the following code in Python after removing all syntax error(s). (3)
30 = To
for K in range(0, To)
If K%4 = 0:
Print(K*4)
Else:
Print(K+3)
To = 30
for K in range(0, To):
if K % 4 == 0:
print(K * 4)
else:
print(K + 3)

Q27. Write a program that performs the following operations on a given list of integers L1: (3)
L1=[20,22,13,20,50]
i. Find the sum of all the even numbers in the list.
ii. Calculate the average of the odd numbers in the list.

L1 = [20, 22, 13, 20, 50]

# i. Find the sum of all the even numbers in the list


sum_even = 0
for num in L1:
if num % 2 == 0:
sum_even += num

# ii. Calculate the average of the odd numbers in the list


odd_numbers = []
for num in L1:
if num % 2 != 0:
odd_numbers.append(num)

average_odd = sum(odd_numbers) / len(odd_numbers) if odd_numbers else 0

print("Sum of all even numbers:", sum_even)


print("Average of odd numbers:", average_odd)

Q28. Answer the followings :- (3)


i. Name 1 open source and 1 proprietary RDBMS software.
Open source RDBMS software: PostgreSQL,MySQL

Page 5
Proprietary RDBMS software: Oracle Database, IBM DB2, MS ACCESS

ii. Write a query to remove the database named "Stu_Info"


DROP DATABASE Stu_Info;
iii. Rahul is doubtful whether a table named "Movie_Base" exists in the database or not.
Help him by writing a query in the MySQL to verify the presence of the mentioned table.
SHOW TABLES LIKE 'Movie_Base'; or SHOW TABLES;

Q29. Define the following terms :- . (3)


i. Primary Key
ii. Unique Constraint
iii. Not Null Constraint
I. Primary Key: Unique identifier for each record in a table, ensuring data integrity.
ii. Unique Constraint: Ensures that each value in a column is unique, except for NULL
values.
iii. Not Null Constraint: Requires a column to always contain a value, prohibiting NULL
values.

Q30. What is Cloud Computing? Explain any two types of cloud computing services. (3)
Cloud Computing: Delivery of computing services over the internet, including storage,
processing power, and applications, on-demand, without direct management.

Two types:
1. Infrastructure as a Service (IaaS): Provides virtualized computing resources over the
internet, such as servers, storage, and networking.
2. Software as a Service (SaaS): Delivers software applications over the internet on a
subscription basis, eliminating the need for local installation and maintenance.

OR
i. How we can utilize blockchain technology to elevate the assessment process in schools.
ii. What do you understand about the term PaaS?
iii. Give examples of any two IoT devices.
i. Blockchain technology can enhance school assessment processes by providing secure,
immutable records of student achievements and grades, ensuring transparency and
preventing tampering.

ii. Platform as a Service (PaaS) is a cloud computing model that provides a platform
allowing customers to develop, run, and manage applications without dealing with the
underlying infrastructure.

iii. Examples of IoT devices include smart thermostats (e.g., Nest) and wearable fitness
trackers (e.g., Fitbit).

Section - D (3 x 5 = 15)

Q31. The record of Student (Name, Class, Marks in 3 subject and Percentage) is stored in the following (5)
list: student=[‘Kamal’, ‘IX’, [98,88,65],94]
Write Python statements to retrieve the following information from the list Sale:

Page 6
i. Print the marks of the 2nd Subject.
ii. Change the marks of 3rd subject to 76.
iii. Remove the class from the list
iv. Delete percentage from the list
v. Print average marks of all three subjects’ marks.
student = ['Kamal', 'IX', [98, 88, 65], 94]

# i. Print the marks of the 2nd Subject.


print("Marks of the 2nd Subject:", student[2][1])

# ii. Change the marks of 3rd subject to 76.


student[2][2] = 76
print("Updated marks after changing the 3rd subject:", student[2])

# iii. Remove the class from the list


del student[1]
print("List after removing the class:", student)

# iv. Delete percentage from the list


del student[2]
print("List after deleting percentage:", student)

# v. Print average marks of all three subjects' marks.


average_marks = sum(student[2]) / len(student[2])
print("Average marks of all three subjects:", average_marks)

OR
Consider the following dictionary:
states={'G': 'Goa', 'K': 'Karnataka', 'T': 'Telangana', 'B': 'Bengal'}
Write Python statements for the following:
i. To insert (‘M’ : ‘Madhya Pradesh’) in the dictionary states.
ii. To return the value corresponding to the key ‘K’
iii. To print all the keys of the dictionary states.
iv. To delete the item from the dictionary corresponding to the key ‘T’
v. To delete the whole dictionary object
# Given dictionary
states = {'G': 'Goa', 'K': 'Karnataka', 'T': 'Telangana', 'B': 'Bengal'}

# i. To insert ('M': 'Madhya Pradesh') in the dictionary states.


states['M'] = 'Madhya Pradesh'
print("Dictionary after inserting ('M': 'Madhya Pradesh'):", states)

# ii. To return the value corresponding to the key 'K'


print("Value corresponding to the key 'K':", states['K'])

# iii. To print all the keys of the dictionary states.


print("Keys of the dictionary:", states.keys())

Page 7
# iv. To delete the item from the dictionary corresponding to the key 'T'
del states['T']
print("Dictionary after deleting the item corresponding to the key 'T':", states)

# v. To delete the whole dictionary object


states.clear()
print("Dictionary after deleting the whole dictionary object:", states)

Q32. Consider the table ‘Bank’ given below and write suitable SQL queries for the following: (5)

i. Show the details of Accounts who have opened a Current Account.


SELECT * FROM Bank WHERE Acctt_Type = 'Current';
ii. Show the Account Holder and Contact No of those who have not deposited any opening
balance.
SELECT Account_Holder, Contact_No FROM Bank WHERE Opening_Bale is NULL;
iii. Show the unique Account type available in the table Bank.
SELECT DISTINCT Acct_Type FROM Bank;
iv. Show all the details of those Accounts whose Account Holder name’s 2nd character is “a”.
SELECT * FROM Bank WHERE Acct_Holder LIKE '_a%';
v. Add a new record with the following data-
11006, Tamanna, Fixed, 70000, 9255617800
INSERT INTO Bank VALUES (11006, 'Tamanna', 'Fixed', 70000, 9255617800);

Q33. i. Consider a relation ‘Employee’ has the following attributes: (5)


(Emp_ID, Emp_Name, Date_of_Joining, Post, Selary)
a. Write a command to insert a single row into a table named "Employee" with the
following attributes and respective values:
Emp_ID : EMP010
Emp_Name: James
Date_of_Joining: 2012-06-22
Post: Manager
Salary: 78000
INSERT INTO Employee
VALUES ('EMP010', 'James', '2012-06-22', 'Manager', 78000);
b. Name the attribute which can be chosen as the Primary Key?
The attribute that can be chosen as the Primary Key is "Emp_ID",
ii. Ms. Shweta wants to display unique values from the attribute ‘Travel_Date’ from the table
‘Traveler_Details’ mentioned in Q32. Write a query for the same?

Page 8
SELECT DISTINCT Travel_Date FROM Traveler_Details;

iii. How NULL is different from a blank space in MySql? Write the reason to support your
answer.
NULL in MySQL represents the absence of a value, while a blank space is
considered as a value. NULL indicates that the value is unknown or not applicable,
whereas a blank space means that the attribute has been assigned an empty string.
iv. % and _ are used with the _____________ operator in MySQL.
% and _ are used with the LIKE operator in MySQL.
‘OR
Mr. Malhotra is working on a MySQL table named ‘Stud’ with the following table schema:

i. Which command is used to get the above table as output


The command used to get the above table as output is the DESCRIBE/DESC
command.
ii. Write the query to create the above given table ‘Stud’.
CREATE TABLE Stud (
regno INT PRIMARY KEY,
name VARCHAR(30),
marks INT,
dob DATE
);
iii. Write a command to add a column address varchar(20) in the above table.
ALTER TABLE Stud ADD address VARCHAR(20);
iv. Write a command to delete the column date from the Stud table.
ALTER TABLE Stud DROP COLUMN date;
v. Can more than one table be created in a database by Mr. Malhotra.
Yes, more than one table can be created in a database by Mr. Malhotra. In relational
databases like MySQL, multiple tables can be created within a single database to
organize and store different types of data.

Section - E (2 x 4 = 08)

Q34. Write the commands for the following (1+1


i. To delete a database called MyDB. +2)
DROP DATABASE MyDB;
ii. To delete a column ‘Price’ from the table ‘Sales’
ALTER TABLE Sales DROP COLUMN Price;
iii. To set value of ‘Price’ to 500 where productID is ‘P001’ in the table ‘Sales’
UPDATE Sales SET Price = 500 WHERE ProductID = 'P001';
OR (option for part iii only)
To display all the records of the products in descending order of the price in ‘Sales’ table.
SELECT * FROM Sales ORDER BY Price DESC;

Page 9
Q35. i. What will be the output of following program: (1+1
book1 = {"Title": "Python Programming","Pages": 300} +2)
book2 = {"Title": "Java Programming","Pages": 300}
print(book1 == book2)
False
ii. Explain how value to the multiple variable can be assigned in a single line using an
example.
In Python, values to multiple variables can be assigned in a single line using tuple
unpacking. For example:a, b, c = 1, 2, 3
iii. Predict the output of the following:
categories = ["A", "B", "C", "D"]
scores = [80, 75, 85, 90]
for i in range(len(categories)):
if categories[i] == "B":
scores[i] += 15
if categories[i] == "B":
scores[i] -= 6
print(scores)

[80, 84, 85, 90]

OR (option for part iii only)


Name the function for the following:
a. To declare an empty dictionary.
empty_dict = dict() OR empty_dict = {}

b. To append a dictionary named D2 in the dictionary D1?


D1.update(D2)

-----------------END-------------

Page 10

You might also like