Confused with practice question about not operator

Hello there!
I was working on some Python 3 practice questions in the Codecademy Go app, and I’m stuck with this question:

I thought the answer would be the second option, but according to the app, the correct answer is the following (which is hidden in the screenshot):
if age <= 15 and height <= 65 and rollercoaster != "Cyclone":

I don’t really get the explanation for my wrong answer. Why shouldn’t the logical operator and be inverted? Shouldn’t A and B and C negated be not A or not B or not C? I’m thinking of De Morgan’s Law… am I getting something wrong here?

Any help would be much appreciated. Thanks! :smiley:

That’s one of the De Morgan’s Laws
not(A and B) is the same as (not A) or (not B)
In this case,
not(age > 15 and height > 65 and rollercoaster == "Cyclone")
is equivalent to
(not( age >15)) or (not (height > 65)) or (not (rollercoaster == "Cyclone"))
but if something is not > then it must be ≤
so its equivalent to
age <= 15 or height <= 65 or rollercoaster != "Cyclone"

Exactly. So the solution there in the app must be wrong.
Thanks a lot for the reply!