Need some help/advice on this please!

Hello
I am a newbie and I have done my best on this…but, why is it 'jumpy" and can you tell me what code I need for it to loop twice and then stop.
Thank you very much in advance.