Test Index

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

© examsnet.com
Question : 24 of 35
Marks: +1, -0
(a) Write the output of the Python code given below :
g=0
def fun1(x,y):
global g
g=x+y
return g
def fun2(m,n):
global g
g=m-n
return g
k=fun1(2,3)
fun2(k,7)
print(g)
OR
(b) Write the output of the Python code given below :
a=15
def update(x):
global a
a+=2
if x%2==0:
a*=x
else:
a//=x
a=a+5
print(a,end="$")
update(5)
print(a)
Advertisements
Go to Question: