asked 41.0k views
4 votes
In a certain country, a person must be at least 16 years old to drive a car and must be at least 18 years old to vote. The variable age represents the age of a person as an integer. Which of the following expressions evaluates to true if the person is old enough to drive but not old enough to vote, and evaluates to false otherwise? 1. (age ≥ 16) AND (age ≤ 18) Il. (age ≥ 16) AND (NOT(age ≥ 18)) III. (age < 18) AND (NOT(age < 16)) • Il only O land Ill only • Il and Ill only • I and Il only

1 Answer

5 votes

Answer:

The expression that evaluates to true if the person is old enough to drive but not old enough to vote, and false otherwise, is (II) only: (age ≥ 16) AND (NOT(age ≥ 18)).

Here's an explanation of why the other expressions are not correct:

- (I) (age ≥ 16) AND (age ≤ 18): This expression evaluates to true if the person is at least 16 years old and at most 18 years old. However, it does not satisfy the condition of being old enough to drive but not old enough to vote, as it allows for the person to be 18 years old, which is old enough to vote.

- (III) (age < 18) AND (NOT(age < 16)): This expression evaluates to true if the person is under 18 years old and is not under 16 years old. However, it does not satisfy the condition of being old enough to drive but not old enough to vote, as it allows for the person to be 16 years old, which is old enough to drive.

Therefore, only expression (II) (age ≥ 16) AND (NOT(age ≥ 18)) evaluates to true if the person is old enough to drive but not old enough to vote, and false otherwise.

answered
User Hydeph
by
8.5k points

No related questions found