0

(Module 40.1 )python core I am always getting output as 0 (output should be 45)

WAP to calculate sum till the argument given from 0 https://code.sololearn.com/cO92f50G2xb6/?ref=app

30th Apr 2021, 6:13 AM
Pranav Patil
Pranav Patil - avatar
2 Answers
+ 1
Pranav Patil Because you have returned value inside loop. Return outside loop but in function. https://code.sololearn.com/cflb7TYnI7Ok/?ref=app
30th Apr 2021, 6:16 AM
A͢J
A͢J - avatar
+ 1
Thk u ver much it helped me
30th Apr 2021, 6:17 AM
Pranav Patil
Pranav Patil - avatar