Question: Exercise 4 When bakers get together for a party, they like to eat pastries. A bakers' party is successful when the number of pastries is


Exercise 4 When bakers get together for a party, they like to eat pastries. A bakers' party is successful when the number of pastries is between 40 and 60, inclusive. Unless it is the weekend, in which case there is no upper bound on the number of pastries. Step 1: Complete this truth table (fill in the values in the "Is this party successful?" column). Is it the weekend? Number of pastries Is the party successful? true Below 40 true Between 40 and 60 true Above 60 false Below 40 false Between 40 and 60 false Above 60 Step 2: Create a new editor window and save it. Use lab5ex4.py as the file name. Step 3: Use the function design recipe to develop a function named bakers_party. The function takes two arguments. The first argument is True if it's the weekend, False if the day is 3 a weekday. The second argument is the number of pastries (an integer). The function returns True if a party with the given arguments is successful, 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. After you've finished testing, close the editor window for lab5ex4.py
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
