Question 3
Back to Exercise
Which condition is true exactly when x is between 10 and 20, inclusive?
- A 10 <= x <= 20
- B x >= 10 || x <= 20
- C x >= 10 && x <= 20 Correct
- D x > 10 && x < 20
Correct Answer: Option C
Both bounds must hold, so join them with &&. The chained form is parsed as (10 <= x) <= 20 (always true), and the || version is true for every x.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!