Python - Operators and Expression Evaluation
Which of the following Python expressions correctly checks if a variable
num lies between 15 and 30, including both endpoints?num lies between 15 and 30, including both endpoints?num is between 15 and 30 inclusive, meaning it can be equal to 15 or 30 as well.15 <= num <= 30, which checks if num is greater than or equal to 15 and less than or equal to 30.or, which is incorrect because num could be less than 15 or greater than 30 and still satisfy the condition.or with strict inequalities, which is incorrect for the same reason.num = 15 and num = 30 returns True [OK]15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions