The use of if - else if - else decision construct & importance of planning using examples in coding

Опубликовано: 13 Март 2026
на канале: Eugene O' Regan
21
2

The if ... if else ... else decision construct and the need for working out the logic of algorithms through well known examples (in this case, a football scoreline).
A football scoreline has three possible outcomes, so using the if ... if else ... else we can decide this.

Again, there is annotation and please pause the video to read.

Main Chapters
========
0:00 Intro
1:27 Importance of decomposing mental process
1:55 Listing the possible outcomes of this scenario
2:40 How many outcomes do we need to test for - typically n-1 (where n is number of outcomes)
3:05 - Pseudocode and its importance
3:42 - ASIDE: Math.random() for generation of random numbers
4:48 - ASIDE: Mathematical Operators - A recap!
5:34 - If decision construct
6:24 - Using multiple independent If statements or one If ... else If
9:10 - One scenario may have many solutions
9:43 - Importance of write, test, repeat
12:20 - CODING
12:58 - Importance of write, test, repeat (This must be important!)
20:10 - Questions for you!


Please leave questions in comments and feel free to contact