Why is there an error in my code?

I don’t know what is wrong with my code. Can someone please help?

def process(a):
    for i in range(len(a)):
    a[i] = a[i] + 100

#***************** MAIN ******************
num = [45, 78, 19, 23]
print (num)
process (num)
print (num)
1 Like

you have indentation error after for loop you must add indentation
correct code:

def process(a):
    for i in range(len(a)):
        a[i] = a[i] + 100

#***************** MAIN ******************
num = [45, 78, 19, 23]
print (num)
process (num)
print (num)
2 Likes