Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 16803

Conditionals, loops and functions in python

$
0
0

QuestionThe rules of eligibility for a snake wrestling competition are as follows:

Entrants must be snakes.

Entrants must be at least 5 years old and younger than 20 years old.

Entrants must not be venomous.

Entrants must be more than 1 long and no more than 2 metres long.

Entrants that have wrestled before should only have won less than half of their matches.

Entrants that have wrestled more than five times before should be no more than 12 years old.

The competition organiser would like to write a Python function to help determine which snakes are eligible to wrestle. They have started the function and created some variables to test it. The function should return a Boolean which is True if a snake is eligible and False otherwise.


Viewing all articles
Browse latest Browse all 16803

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>