Control Structures with Python

Good day to you all, I have just created a new tutorial “Control Structures with Python

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.

Read more

1 Like

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 :wink:

1 Like

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

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?

1 Like

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.

1 Like

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!

2 Likes