Compound Boolean Expression Logic
Develop code to represent compound Boolean expressions and determine the result of these expressions.
A programmer needs to check if a student qualifies for honors (GPA >= 3.5 AND either SAT >= 1400 OR ACT >= 32). Which of the following correctly represents this compound condition?
A
gpa >= 3.5 && (sat >= 1400 || act >= 32)
B
gpa >= 3.5 || (sat >= 1400 && act >= 32)
C
gpa >= 3.5 && sat >= 1400 || act >= 32
D
(gpa >= 3.5 && sat >= 1400) || act >= 32
Question Leaderboard
Not enough data yet to show leaderboard.
APFIVE