#Loop help
1 messages · Page 1 of 1 (latest)
i=1 sum_n=2
i=2 sum_n=7
i=3 sum_n=15
i=4 sum_n=26
I'm not sure which step you're missing to get 14
igot 26 too. how are you running it?
are you printing out sum_n? or is this part of a function?
I think they're running it and getting 26 but don't understand the logic and when they walk through the code in their head they get 14