Page 394 - Computer Science Class 11 Without Functions
P. 394
nwJob = “ “
for j in range(length):
if(job[j] >= ‘e’ and job[j] <= ‘m’):
nwJob = nwJob + job[j].upper()
elif job[j].isdigit():
nwJob = nwJob + job[j - 1]
elif job[j] >= ‘C’:
nwJob = nwJob+job[j] . lower()
else:
nwJob = nwJob + ‘*’
print(“The new String is : “, nwJob)
location = str(nwJob . find(‘#’))
print(“The encrypted String is :”, location.join(nwJob))
29. Do the following conversion:
a. (145.08)10 to binary
b. (7014)8 to hexadecimal
c. (10100.10)2 to octal
30. Consider the list given below:
L1 = [48.0,-1,’hello dear’,30,”bye”, 12.25,30]
Write the Python statement for each of the following tasks using BUILT-IN functions/methods only
a. To append each element of the list, L2 at the end of list L1.
b. To insert an elmennt 501 at the fourth place of list L1.
c. To delete the first occurrence of 30 in the list.
Section-D
31. Differentiate between the following:
a. Mutable and Immutable data types
b. insert() and extend() with respect to lists in Python
32. Recently Akhil has created an account on a social media platform. Within a few days he adds many people, known
and unknown to him to his friends list. After some time, he starts getting abusive and negative posts. His pictures
are shared online without his permission.
Based on the information given information, answer the questions given below:
a. Identify the type of cybercrime mentioned above.
b. Under which act she can lodge a complaint to appropriate authorities
c. Name any two social media platforms that may have been used by Akhil.
d. Suggest him any two precautionary steps to avoid any such situations.
Section-E
33. What will be the output of the code snippet given below:
(i) for ch in “OraNge”:
print(ch, end = ‘*’)
else:
print(“ Practice Papers”)
392 Touchpad Computer Science-XI

