0% found this document useful (0 votes)
28 views3 pages

Cl11 - Comp SC - PA2 - QP

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views3 pages

Cl11 - Comp SC - PA2 - QP

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Seth M.R.

Jaipuria Schools
Periodic Assessment II
Session: 2022-23

Class: XI Time: 1 hour 30 minutes


Subject: Computer Science (083) Max Marks: 35

General Instructions:

 The Paper has two sections i.e. A and B comprising both objective and subjective
questions.
 All the questions are compulsory.
 Question No. 1 to 3 in Section A is of 1 mark each.
 Question No. 4 to 6 in Section A is of 2 marks each.
 Question No. 7 to 8 in Section A is of 3 marks.
 Question No. 9 to 11 in Section B is of 1 mark each.
 Question No. 12 to 15 in Section B is of 2 marks each.
 Question No. 16 to 18 in Section B is of 3 marks each.
 Do all the questions in serial order.
 Write neatly and legibly.
 All the best!

SECTION A - Objective
Read the questions and choose the correct option.
Q1. Lists are ___________ sequences of Python.
A. immutable
B. simple
C. mutable
D. complex

Q2. Which operator is used to repeat a list specified number of times?


A. +
B. %
C. *
D. –
Q3. Which is the correct format to use slice steps of tuples in Python?
A. seq = T[start : step : stop]
B. seq = T[stop : start : step]
C. seq = T[step : start : stop]
D. seq = T[start : stop : step]
Q4. What will be the output?
“jap” in “Japan”
A. True
B. False
C. Can’t say
D. May be
Q5. T[i : j] will return ____________.
A. the item at index i.
B. a new tuple containing every nth item from index i to j, excluding index j
C. a new tuple containing the objects between i and j excluding index j.
D. None of these.
Q6. Which of the following method is incorrect to copy a dictionary in Python?
A. dict2 = dict1.copy()
B. dict2 = dict(dict1)
C. dict2 = dict1
D. None of these
Q7. Which of the following statement(s) are correct:
I. A conditional statement is used to repeat a block of statements a specified number
of times.
II. The ‘for’ loop gets executed at least once in Python.
III. The ‘while’ is a conditional loop in Python.
IV. The ‘in’ operator can only be used with the ‘while’ loop.
V. The ‘while’ loop is called an entry-controlled loop.

A. Only IV
B. I and II
C. II, III and V
D. I and III
Q 8. Answer in one word:
I. Which function will return all the dictionary items including the key-value pairs?
II. Which function creates a new dictionary from the given sequence, like string, list,
tuple?
III. Which function will return the keys of the dictionary items only?

A. I. values( ) II. items( ) III. fromkeys( )


B. I. items( ) II. dict( ) III. keys( )
C. I. values( ) II. items( ) III. keys( )
D. I. fromkeys( ) II. keys( ) III. items( )
SECTION B – Subjective
Q9. What is the index of the first character of a string stored in memory?

Q10. Write any two characteristics of tuples.

Q11. Write an example to access the elements of a dictionary.

Q12. How many times does the following code execute?

d=0
while d < 18 :
d += 2
Q13. Write the output of the given code:

roll = ‘121’
print(roll.isalpha( ))

Q14. Write the most appropriate list method to perform the following tasks.
I. Removes the first occurrence of the given item from the list.
II. Removes the element at the given index from the list and returns the removed
item.

Q 15. Identify the error and explain the reason:

t = (5)
print(len(t))

Q16. Write a Python script that asks the user to enter a length in centimetres. If the user
enters a negative length, the program should display the message ‘ invalid entry ’. Otherwise,
the program should convert the length to inches and print out the result. There are 2.54
centimetres in an inch.

Q17. In python, there are some operations that can be performed on the string data type.
Write the purpose of any three operations with an example of each.

Q18. Observe the given list and answer the given questions:

L = [1, 2, [10, 20, [ 30, 40]], 3, 4]

I. print(L[2])
II. print(L[2][2])
III. print(L[2][2][0])

You might also like