Why is my coding throwing an error called unreachable code

i tried to use while loop instead of for and used a variable to store a value in each iteration and outside the loop i printed the value to get the sum of all but it shows code unreachable at the print statement why is that so

your submissions show you have scored 100! great job !
if this solves your doubt please mark it as resolved :slight_smile: