0
explanation plzzzz!!!
def func(x): res = 0 for i in range(x): res += i return res print(func(4))
2 Réponses
+ 4
res = 0
for i in range(4) # i= 1, 2, 3
i= 0
res += i # res ----- 0
i = 1
res += i #res ----- 1
i= 2
res += i #res ----- 3
i = 3
res += i #res ----- 6