What is the function of the IF statement in the selection control structure? Wha
ID: 674081 • Letter: W
Question
What is the function of the IF statement in the selection control structure? What is the function of the ELSE statement in the selection control structure? What is the function of the simple selection control structure? What is the function of the null ELSE statement? What is the function of the combined selection statement? What is the function of the nested non-linear IF statement? What is the function of the nested linear IF statement? What is the function of the CASE structure? Solve problems using the simple selection control structure. Solve problems using the null ELSE statement. Solve problems using the combined selection statement. Solve problems using the nested non-linear IF statement. Solve problems using the nested linear IF statement. Solve problems using the CASE structure.
Explanation / Answer
In this case, the part_time_count field will be altered only if the student’s attendance pattern is part-time” (Lesley Anne Robertson , 2007, para. Chapter 4 Section 1).
Observe that the == symbol is for evaluation; therefore, an = symbol would set Sex to F. In case the OR were used to mix the above mentioned two conditions, in that case just one of the conditions must be correct for the mixed condition to be considered correct. In case neither is correct, therefore the mixed condition would be incorrect. Modifying the AND in the above instance to OR greatly modifies the result.
Only one condition needs to be satisfied. For nonlinear, different conditions exist; thus, they need to be satisfied. For instance, one can recode the previous combined code in nonlinear selection:
Notice--the quantity of IF conditions should be equal to the quantity of ENDIF and OTHERWISE Non-linear nested IF statements could have logic mistakes which can be difficult to fix, therefore they must be utilized in moderation.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.