You are on page 1of 1

KAMLAVATI SENIOR SECONDARY SCHOOL, SAHUPURAM

XI CBSE– COMPUTER SCIENCE TEST MARKS: 20


1) What does list.clear() method (2)
2) How do you determine the length of the string? (2)
3) Rectify the error (if any) in the given statements. (3)
str="Hello World"
str[5]='p'
4) Consider the statement:
str="David had a bag." Change the substring "had” from the
original string to "has" in a new string. Explain. (3)
5) Write code to calculate and display the sum of all the even
numbers in the list.
L1=[10,20,33,40,57,60,70,85,90,101] (5)
6) Consider the string str=”Global Warming”;
write statements in python to implement the following: (5)
To display the last four characters.
To display the substring starting from index 4 and ending at
index 8.
To check whether string has alphanumeric characters or not.
To trim the last four characters from the string.
To trim the first four characters from the string.

You might also like