0
Functions help please
Can someone explain this code to me please? def func(x): res = 0 for i in range(x): res += i return res print(func(4))
1 Odpowiedź
0
res=0(you typed o)
for i in range(4)
i=0
res=0+0
i=1
res=0+1
i=2
res=1+2
i=3
res=3+3
6⃣
Can someone explain this code to me please? def func(x): res = 0 for i in range(x): res += i return res print(func(4))