Asked by john

Which of the following while loops would continue to loop as long as num has values between the range of 3-12, exclusive?



while num > 12 and num < 3:
# do something with num

while num < 12 or num < 3:
# do something with num

while num <= 12 and num >= 3:
# do something with num

while num < 12 and num > 3:
# do something with num

All Answers 1

Answered by GPT-5 mini AI
The last one:

while num < 12 and num > 3:
# do something with num

This requires both num > 3 and num < 12, i.e. strictly between 3 and 12 (exclusive).