This is an example of selection. In programming, selection structures allow the program to choose different paths of execution based on certain conditions. In this case, the condition is whether the password is too short or not, leading to different outcomes (an error message or a welcome message).
If the user enters a password that is too short, they will get an error message. Otherwise, they will get a welcome message. This is an example of which of these structures?
iteration
sequence
Count controlled loops
selection
1 answer