June 2025
Intermediate to advanced
515 pages
17h 5m
English
The example on recursion has shown that certain algorithms are not executable without control structures. Thus, in real life, you’ll always find programs with branching structures. Applied computer science distinguishes between single selection and multiple selection branches.
A single selection has the following general structure:
if condition: statement1 statement2 statement3else: statement4 statement5
If the condition is true in the single selection, then the statement block from statement1 to statement3 will be executed; if the condition is false, then the statement block from statement4 to statement5 will be run. Let’s use an example of a quadratic equation to show how a choice between ...
Read now
Unlock full access