Determine the logical conditions that affect the outcome of a decision.
2.1.4 Thinking Logically
Thinking Logically — Note 2 of 3
Candidates need to understand what these decisions are and the logical conditions that determine their outcome.
Each decision depends on a logical condition that evaluates to true or false. You need to write these conditions precisely, using comparison and Boolean operators.
==, !=, <, <=, >, >=) and Boolean operators (AND, OR, NOT).< and <= give different results at the boundary.if x > 5 AND < 10. The variable must be repeated: if x > 5 AND x < 10.if mark < 0 OR mark > 100 checks for INVALID input; if mark >= 0 AND mark <= 100 checks for VALID input.if age >= 13 AND age <= 19 then
category = "Teen"
elseif age < 13 then
category = "Child"
else
category = "Adult"
endif