Programming and Algorithms: Week 4

Banner

Iteration

What are we doing this week?


This week we are going to look at the idea of ITERATION, how to tell the program to repeat operations.
First we will look at the WHILE loop, and then the FOR, DO and LOOP loops.
Moving onto the Python side of things we will look at how to implement ITERATION in Python.

 
PseudoCode Python Python Logo

Powerpoint: 
Iteration-WHILE


Powerpoint: Iteration-FOR-DO-LOOP


Powerpoint: 
Iteration


Powerpoint: Some Common Issues


Iteration - WHILE and FOR Loops
Total running time of videos is 40 minutes.

Sample Code:
Print1To5 * Sum1To5 * Factorial * Print1To5For


Links

Lab #4
Lab #4 is all about checking if what you have learned in the episodes above all makes sense, and if you can use WHILE loops and the FOR loops.


Back

If you have any suggestions, corrections, or comments, please feel free to e-mail me at:
Damian.Gordon(a)dit.ie