# Control Structures with Python

**URL:** <https://forum.core-electronics.com.au/t/control-structures-with-python/8169>\
**Category:** Guides\
**Created:** [10 August 2020 23:39 UTC](https://forum.core-electronics.com.au/t/control-structures-with-python/8169 "2020-08-10T23:39:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/tim/32/3324_2.png) [@Tim](https://forum.core-electronics.com.au/u/Tim)\
**Post date:** [10 August 2020 23:39 UTC](https://forum.core-electronics.com.au/t/control-structures-with-python/8169/1 "2020-08-10T23:39:43Z")

</div>

Good day to you all, I have just created a new tutorial “[Control Structures with Python](https://core-electronics.com.au/tutorials/control-structure-python.html)”

This guide will provide you with control structure flowchart tools to help aid conceptualisation of the control flow within your programming scripts. Simply put, the control flow is a general term which describes the order in which your lines of code are carried out. This flow can become increasingly intricate as your courageous coding capers climb in complexity. Python is a perfect fit with microprocessors such as the [Raspberry Pi 4 Model B 8GB](https://core-electronics.com.au/raspberry-pi-4-model-b-8gb.html).

[![](https://core-electronics.com.au/media/kbase/control-structures-feature-image-300.png) ](https://core-electronics.com.au/media/kbase/control-structures-feature-image-300.png)

[Read more](https://core-electronics.com.au/tutorials/control-structure-python.html)

---

<div class="post-metadata">

**Author:** ![Ian93451](https://avatars.discourse-cdn.com/v4/letter/i/e480ec/32.png) [@Ian93451](https://forum.core-electronics.com.au/u/Ian93451)\
**Post date:** [16 August 2020 22:32 UTC](https://forum.core-electronics.com.au/t/control-structures-with-python/8169/2 "2020-08-16T22:32:07Z")

</div>

Very well done, one comment for your international audience who have to suffer an extra 3 years before they can drink (if at all they can drink) add a switch case statement based on country 😉

---

<div class="post-metadata">

**Author:** ![Tim](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/tim/32/3324_2.png) [@Tim](https://forum.core-electronics.com.au/u/Tim)\
**Post date:** [17 August 2020 23:56 UTC](https://forum.core-electronics.com.au/t/control-structures-with-python/8169/3 "2020-08-17T23:56:54Z")

</div>

I will add it as an addendum to future script files 🙂 I’m glad you like it, cheers mate!

---

<div class="post-metadata">

**Author:** ![Christopher46689](https://avatars.discourse-cdn.com/v4/letter/c/e36b37/32.png) [@Christopher46689](https://forum.core-electronics.com.au/u/Christopher46689)\
**Post date:** [24 August 2020 23:16 UTC](https://forum.core-electronics.com.au/t/control-structures-with-python/8169/4 "2020-08-24T23:16:54Z")

</div>

Just wondering why you are using the term iteration rather than repetition as a control structure. We were told the 3 constructs were sequence, selection and repetition. Is it just a trend, or is there a real reason for it?

---

<div class="post-metadata">

**Author:** ![Tim](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/tim/32/3324_2.png) [@Tim](https://forum.core-electronics.com.au/u/Tim)\
**Post date:** [25 August 2020 02:31 UTC](https://forum.core-electronics.com.au/t/control-structures-with-python/8169/5 "2020-08-25T02:31:19Z")

</div>

Hey Chris, good question. In this context repetition and iteration are interchangeable and they normally are.

However if I personally were to say ‘look at this iteration here’ I would be talking about a single cycle of the looping structure. Whereas if I say ‘look at this repetition here’ I would be talking about the entire looping structure.

---

<div class="post-metadata">

**Author:** ![Christopher46689](https://avatars.discourse-cdn.com/v4/letter/c/e36b37/32.png) [@Christopher46689](https://forum.core-electronics.com.au/u/Christopher46689)\
**Post date:** [25 August 2020 03:19 UTC](https://forum.core-electronics.com.au/t/control-structures-with-python/8169/6 "2020-08-25T03:19:04Z")

</div>

That’s a good explanation. I particularly like the iteration being a single instance of a loop

My way of thinking is that iteration tends to imply looping around something in order to make it better - so I might iterate an algorithm 5 times before I get it correct (so write and rewrite). Repetition on the other hand is looping a mathematical number of times in code.

Gotta love the English language!
