Programming Basics #25 Iteration


http://learn-share.net/programming-basics-course/
Programming Course. The Basics of Programming.
#25 Iteration

Learn to code.

Introduction To Iteration

So let’s talk interation. This is the program buzz word for a loop.

Let’s take an example.
You start to writing some code, a few statements to deal with, changing the position of an image on te screen.

So you write a few statements once, and then you figured out you have to do it again. So you write it again, and again. And again.

As you can see, it can get pretty tedious. So rather to write it out several times the same thing, you will like to write your statements once, and just say, repeat this, repeat it 5 times. Or repeated 5000 times.

Or, keep repeating until you told it to stop.
Or go thru all the fields on a web page.
Or go thru every mp3 file in a folder.

So we might repeat two statements, we might repeat a dozen, or a 1000.