- 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

28th Apr 2017, 8:47 AM
Alwi Shaik Delgado Alaudinq
1 Resposta
0
def sum(x): res=0 for i in range(x): res+= i return res
28th Apr 2017, 9:20 AM
Bahhaⵣ
Bahhaⵣ - avatar