+ 1

Can anyone help with explaining this code?

https://code.sololearn.com/caB0aPZpuhkq/?ref=app

7th Mar 2022, 2:28 PM
roboto codes
roboto codes - avatar
3 Réponses
0
Inside 'when', Change value of i to 6 instead of 5. That way 15 will be skipped.
7th Mar 2022, 2:54 PM
kev_coding
kev_coding - avatar
0
kev_coding I know I'll have to change i to 6 if I want 15 to be skipped but I'm asking why?? The code skips when i is 5 but looking at the comment in the code, when i is 5, sum is 15 and not 10 so why is 10 skipped?
8th Mar 2022, 5:22 PM
roboto codes
roboto codes - avatar