When learning the programming, seeing a mature program with all the loops and conditions might look confusing. You might wonder how the programmer has coded all of this?
Here I'll show you how a programmers might solve a challenge in its most basic / simple form and then add loops and conditions to make it more general / userful.