Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fall 2007ACS-1805 Ron McFadyen1 Chapter 7 Repetition.

Similar presentations


Presentation on theme: "Fall 2007ACS-1805 Ron McFadyen1 Chapter 7 Repetition."— Presentation transcript:

1 Fall 2007ACS-1805 Ron McFadyen1 Chapter 7 Repetition

2 Fall 2007ACS-1805 Ron McFadyen2 Repetition An If/Else is a control statement – it determines the actions to be executed next. Alice has two other control statements that are used to determine whether an action should be executed again: Loop : used when we know exactly how many times an action should be repeated While : used when we don’t know in advance how many times an action should be repeated

3 Fall 2007ACS-1805 Ron McFadyen3 Loop blah

4 Fall 2007ACS-1805 Ron McFadyen4 While blah

5 Fall 2007ACS-1805 Ron McFadyen5 Loop The effect of While is often illustrated with the following diagram conditio n Action A true false

6 Fall 2007ACS-1805 Ron McFadyen6 Nested Loops blah

7 Fall 2007ACS-1805 Ron McFadyen7 Tips/Techniques Events & Repetition Begin/during/end


Download ppt "Fall 2007ACS-1805 Ron McFadyen1 Chapter 7 Repetition."

Similar presentations


Ads by Google