Incorrect result in The Cyclone when line 13 is true
Closed this issue · 2 comments
Kids ride for free whoooo!
When height >= 100 and with_taller_person
is True, this code doesn't check whether credits >= 10
.
python-101/3-control-flow/15_the_cyclone_2.py
Lines 13 to 14 in 02f9900
Code editor showing output "Enjoy the ride!" while credits = 0
.
It looks like an easy fix is to move up lines 15-16 and place them at line 10 instead, so that credits are checked first before height. But maybe you don't want that, since it changes what the output is when the person is both too short and also doesn't have credits.
hey @caesiumtea thanks so much for flagging this! I just opened and connect PR #31 to this issue. Could you try out the new code and let me know if you find any more bugs? 🐛