Question: Your function definition must have type annotations and a complete docstring. After you've finished testing, close the editor window for lab5ex4.py. Exercise 5 The squirrels
Your function definition must have type annotations and a complete docstring. After you've finished testing, close the editor window for lab5ex4.py. Exercise 5 The squirrels in Palo Alto spend most of the day playing. In particular, they play if the temperature is between 60 and 90 degrees F (inclusive). Unless it is summer, then the upper limit is 100 degrees instead of 90. Step 1: Build a truth table that summarizes whether squirrels are playing, based on the season and the temperature. The table header is: Is it summer? Temperature Are the squirrels playing? Step 2: Create a new editor window and save it. Use lab5ex5.py as the file name. Step 3: Use the function design recipe to develop a function named squirrel_play. This function takes two arguments. The first argument is a boolean value that specifies the season (True if it's summer, otherwise False.) The second argument is a temperature (an integer). The function returns True if the squirrels are playing, given the temperature and the season; otherwise it returns False. Use the truth table to help you create example function calls and design the function body. Your function definition must have type annotations and a complete docstring. Use the Python shell to test your function. After you've finished testing, close the editor window for lab5ex5.py. Exercise 6
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
