why the output is 6 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

why the output is 6

def func(x): res = 0 for i in range(x): res += i return res print(func(4))

24th Apr 2020, 2:31 PM
Heng Ty
Heng Ty - avatar
1 Answer
+ 1
0+1+2+3=?
24th Apr 2020, 2:38 PM
Abhay
Abhay - avatar