I'm a beginner CS student learning Python right now. I have a very basic challenge on Zybooks that wants me to enter the output of the code provided. It's designed to help understand how break and continue statements work within for and while loops. I've tried to go through the logic of each line of code, and I just can't grasp it. If anybody can help me understand this more, I'd appreciate it.

```
stop = int(input())
result = 0
for n in range(10):
    result += n + 2
    if result > stop:
        break
    print(n)
print(result)

```