CS Cycle Test-1 (06 - 03 - 2025)
CS Cycle Test-1 (06 - 03 - 2025)
8 Rewrite the following code in python after removing all syntax error(s). Underline each 2
correction done in the code.
Val = int("Value:")
Adder = 0
for C in the range(1,Val,4) :
Adder=+C
if C%3==0:
print (C*50)
Else:
print (C)
print (Adder)
10 If L1=[40,30,20,10 ], and
L2=[8,12,25,15,35] then 1
(I)A) Write a statement to insert element 25 in list L1 at index 2. 1
B) Write a statement to sort the elements of list L2 in descending order.
OR
(II) If s tr1 = “ Ken driy a V id ya la y a S a nga tha n ”
A) Write a statement to display the last four characters.
B) print(str1[1:-6])
15 i) Which of the following statement(s) would give an error after executing the 1
following code?
S="Welcome to class XII" #Statement 1
print(S) # Statement 2
S="Thank you" #Statement 3
S[0]= '@' #Statement 4
S=S+"Thank you" #Statement 5