In: Computer Science
You were introduced to control structures - such as IF-ELSE statement, WHILE and FOR loops. Describe what they do and why are control structures important to programming?
IF - ELSE statements are considered as the Control statements, Where these statements are used when we want check the given statement is considered to be true or any value, such that we can decide whether to execute the statement or not, if the given condition is false, then it will not execute the statement in the IF condition then the statement in the ELSE statement will Execute
WHILE and FOR Loops are used to iterate throgh something, it makes us there will be no repeated statements, since we will use the loops, we dont need to write each statement one by one, let the FOR and WHILE Loop statements will take care of itself instead of repeating the statements
Control structures are very important in the programming, where event to be execute or not to execute will depend on the statements we derive, and the loops are used to iterate over the arrays or strings or anything else, which makes them very important for the programming