Final answer:
The correct expression to check if a variable number is between 60 and 100, inclusive, is 'if (number >= 60 && number <= 100)'. This uses the logical AND operator to ensure the number meets both conditions.
The correct option is: B. if (number >= 60 && number <= 100)
Step-by-step explanation:
To check if a value assigned to the number variable falls between 60 and 100, inclusive, the correct expression represents a legal way of writing this condition in programming. In this case, the legal expression is:
- B. if (number >= 60 && number <= 100)
This expression uses logical AND (&&) to ensure that both conditions must be true for the overall condition to be true. In other words, the number must be greater than or equal to 60 and less than or equal to 100. This statement is inclusive of the boundary values 60 and 100, meaning both of these values will satisfy the condition.