Test Index

CBSE Class 12 Computer Science 2023 Paper Set 4 Get it on Google PlayDownload on the App Store

© examsnet.com
Question : 24 of 35
Marks: +1, -0
(a) Write the output of the code given below :
def short_sub (lst,n) :
for i in range (0,n) :
if len (lst)>4:
lst [i]=lst [i]+lst[i]
else:
lst[i]=lst[i]
subject=['CS','HINDI','PHYSICS','CHEMISTRY','MATHS']
short_sub(subject,5)
print(subject)
OR
(b) Write the output of the code given below :
a =30
def call (x) :
global a
if a%2==0:
x+=a
else:
x-=a
return x
x=20
print(call(35),end="#")
print(call(40),end= "@")
Advertisements
Go to Question: