- 1
Which is in order ?
Rearrange the code to define a function that calculates the sum of all numbers from 0 to its argument. 0.)def sum(x): 1.) res += i 2.) return res 3.) for i in range(x): 4.)res = 0
1 Resposta
0
def sum(x):
res=0
for i in range(x):
res+= i
return res