XIInfo Pract S E 179
XIInfo Pract S E 179
XIInfo Pract S E 179
3. (a)Define string in python .Which operator returns true if a character/substring exists in a given string?
2
(b) What is a string slice? How is it useful? 2
(c) Write the uses of following functions in string- 2
len(),capitalize()
(b) Consider the string str=”South Point School”, Write statements in python to implement the following:
2
(i) To display the last three characters.
(ii) To display 1st to 5th characters .
(iii)To display first character in upper case letter.
(iv) To repeat the string 2 times.
(c) What will be the output of the following programming code? 2
Str1=”Class11 Final Examination”
print(Str1([2: ])
print(Str1([2:15:3 ])
print(Str1([ :17 ])
print(Str1([-17:-3 ])
4.(a) Define a list in python. Write command to create a empty list. 2
(b) Consider the following list-
List1=[2,3,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]
Write commands for the following: 5
i. Add 20 at last
ii. Insert 4 at third position
iii. Sort the elements of the list
iv. Count how many times 6 is available
v. Delete all elements from 3rd to 9th position
vi. Delete 11 from the list
vii. Search the position of 13 in the list
viii. Find the maximum value of the list
ix. Find the length of the list
x. Delete all the elements of the list
7.(i) What is cyber safety ? What should you do to protect your identity on Internet? 2
(ii) What are the merits and demerits of social networking ? 2
(iii) Write short notes 6
Cyber Bullying, IP Address, Denial of Service Attacks, Adware, Cybercrime,Hacker