One of the finest features of human intelligence is our ability to adapt on the spot, we go through a lot daily where things don't go according to plan and we find a way around these roadblocks and bottlenecks. If we are like machines, the moment we face something we aren't prepared for, we would collapse and die.
Be that as it may, developers try to make computers react like humans do. We do this by using a software programming term known as "conditional statements". Which is basically a reactive instruction that is set off by an action. We literally type "if" then we describe the situation we're preparing the machine for and we assign a response to the machine. We also add "else if" just in case the first scenario never happens; we can use this as many times as possible (though it's not advisable).
Finally, we write "else" as a last resort just in case all our scenarios never happen. This final conditional statement is what a computer falls back to in case the user of the computer programme doesn't do any of the things that were expected. Without conditional statements, no programme would run for very long. Because we humans are an unpredictable species, even with conditional statements we still end up crashing programmes.