Example code for while loop explanatory slideshow