Why does my code stop?

Why did this code only print 20?

I was experimenting with the code and was trying to see how I could make it only print out the numbers that were divisible by 10. As you see it only went to 20 and stop, why did it do that?

return in an if, or just in a loop will terminate the function. If you wish to print all the numbers, then print instead of return.