Working on Functions
Class - XII
1
2
Find and write the output of the following code:
def ChangeVal(M,N):
for i in range(N):
if M[i]%5 = = 0 :
M[i]//=5
if M[i]%3==0:
M[i]//=3
L=[25,8,75,12]
ChangeVal(L,4)
for i in L :
print(i, end =‘#’)
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
a=1
def f( ):
a=10
print(a)
18
c=10
def add ( ) :
global c
c=c+2
print(“Inside add”,c)
add( )
c=15
print(“In main”,c)