Ask your own question, for FREE!
Computer Science 15 Online
OpenStudy (anonymous):

Problem: The Danger Panda roller coaster requires that riders be at least 1.6 meters tall and under 1.9 meters tall. Return True iff a person, whose height in meters is given as the argument, is allowed to ride the Danger Panda. My solution(code): def allow_rider(height): """(float) -> bool Return True iff height is within the height parameters. Maximum Height of rider: 1.9 meters Minimum Height of rider: 1.6 meters allow_rider(1.7) True allow_rider (1.4) False """ if (height >= 1.6 and height <= 1.9): return True else: return False

OpenStudy (anonymous):

Teachers comment: The following test cases failed: | | test_allow_rider_hair_too_tall - IncorrectReturnValue | | Think about what happens with values near 1.9.

OpenStudy (anonymous):

could somebody help me understand what that means and what needs to be done to correct my code

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!