0% found this document useful (0 votes)
11 views2 pages

Cs 1

The document contains a computer science exam with multiple choice and short answer questions testing knowledge of Python lists including built-in list methods like append(), extend(), index(), slicing and operations like multiplication. Questions cover basic list manipulation and syntax.

Uploaded by

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

Cs 1

The document contains a computer science exam with multiple choice and short answer questions testing knowledge of Python lists including built-in list methods like append(), extend(), index(), slicing and operations like multiplication. Questions cover basic list manipulation and syntax.

Uploaded by

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

ST.

THOMAS PUBLIC SCHOOL,MUVATTUPUZHA


SECOND MID-TERM EXAMINATION

Computer Science
CLASS : XI TIME ALLOWED: 1.5hrs
MAX. MARKS: 35

1. Write difference between append() and extend() methods of list (2)


2. Suppose listExample is [‘h’,’e’,’l’,’l’,’o’], what is len(listExample)? (2)
3. Suppose list1 is [12, 323, 2322, 14, 25], What is list1[:-1] ? (1)
4. To add a new element to a list we use which command ? (1)
5. Suppose list1 is [1, 3, 5, 12, 5], what is list1.index(5) ? (1)
6. What is the output when following code is executed ? (2)
list1 = [11, 13]
list2 = list1
list1[0] = 14
print(list2)
7. What will be the output? (2)
numbers = [11, 12, 13, 14]
numbers.append([15])
print(len(numbers))
8. What is the output of the following code? (2)
a=[132,526,127]
a.append([827])
a.extend([425,627])
print(a)
9. Suppose list1 is [9,1, 3, 2], What is list1 * 2 ? (2)
10. Write output (4)

print("Maria" == "Manoj")

print("Maria" != "Manoj")

print("Maria" > "Manoj")

print("Maria" >= "Manoj")

print("Maria" < "Manoj")

print("Maria" <= "Manoj")

print("Maria" > " ")

11.What is the difference between find() and Replace() (2)

12.Write output (5)

list =[3,5,9]
print(list[0])

print(list[1])

print(list[2])

print('Negative indexing')

output print(list[-1])

print(list[-2])

print(list[-3])

13.Write output (3)

list =['A','N','A','N','D']

print(list[0:3])

print(list[3:])

print(list[:])

14.Write output (3*2=6)

a) For i in range(1,5,2):

For j in range(10,5,-3):

Print(i+j)

b)for k in range(5,10,5):

for m in range(5,25,10):

print(m)

You might also like