Warning: The magic method Slickr_Flickr_Plugin::__wakeup() must have public visibility in /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php on line 152
‘#repetition’ Articles at TC101 Fall 2015
Introduction to Programming Python and C++

Tag Archives: #repetition

Mastery 22 – Types of repetition

There are 3 types of repetition:
-For loop
-While loop
-Recursion

The FOR loop is used when you know the number of repetitions. It can be used with ranges, list tuples or dictionaries(iterable objects).  It takes a value inside the object, work with it, and then do the same thing with the next value until the iterable object is finished.

The WHILE loop is used when you dont how the number of repetitons. It works with a condition and it will repeat until the condition is false.

Recursion is when you call a function inside the same function. It can be used in special cases where you need to take a value from the function itself, this job can be done with FOR or WHILE loops but it´s shorter to write a recursion.

What should you work on?

Week #12 and more partial exams for you.

For this week's readings:
C++ (TC1017) should either be looking at support for your project, ImageMagick C++ libraries are a good start.
Python (TC1014) should be finishing chapter 11 (Dictionaries).