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))

20th Nov 2018, 8:32 PM
Pauline
Pauline - avatar
1 Resposta
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⃣
20th Nov 2018, 8:39 PM
Roneel
Roneel - avatar