Python Tutorial #4: Control Flow — if, for, while, match

In the previous tutorial, we learned about variables, types, and f-strings. Now let’s learn how to make decisions and repeat actions in Python. Control flow statements let your program choose what to do based on conditions and repeat actions in loops. By the end of this tutorial, you will know how to use if, for, while, match/case, and several useful loop helpers. if, elif, else The if statement runs code only when a condition is true: ...

April 25, 2026 · 9 min

Kotlin Tutorial #6: Control Flow — if, when, for, while

In the previous tutorial, you learned about functions. Now let’s learn about control flow — how to make decisions and repeat actions in your code. Kotlin’s control flow is similar to Java, but with important improvements. if and when are expressions that return values. when replaces switch and is much more powerful. ...

March 19, 2026 · 8 min