answer this plz.. | SoloLearn: Learn to code for FREE!

-7

answer this plz..

Rearrange the code to define a function that calculates the sum of all numbers from 0 to its argument. return res for i in range(x): res = 0 def sum(x): res += i

12/11/2016 3:59:37 PM

Tia R Skarin

8 Answers

New Answer

+11

Rearrange the code to define a function that calculates the sum of all numbers from 0 to its argument. def sum(x): res = 0 for in range (x): res +=i return res #quiz @3

+1

Rearrange the code to define a function that calculates the sum of all numbers from 0 to its argument. def sum(x): res = 0 for in range (x): res +=i return res #quiz @3

0

def sum(x): res = 0 for i in range(x): res += i return res

0

It's failing wy

0

All people are answer's its right

0

Rearrange the code to define a function that calculates the sum of all numbers from 0 to its argument. def sum(x): res = 0 for i in range(x): res += i return res

0

all is not right answer,why?

0

def sum(x): res = 0 for in range (x): res +=i return res