Question: all functions in one module, called myFunctions.py. 1) Value-retuming function calculateEggSize a) Define a value-returning function that will return (not printl) the size-category (as a
all functions in one module, called myFunctions.py. 1) Value-retuming function calculateEggSize a) Define a value-returning function that will return (not printl) the size-category (as a string) of an egg depending on the weight of the egg. The weight is the parameter (of type float) of this function. Egg sizes are categorized as: - pee-wee (less than 42 grams). small (above 42, and up to 48 grams). - medium (above 48, and up to 55 grams), large (above 55, and up to 63 grams). extra-large (above 63 , and up to 69 grams), and - jumbo (more than 69 grams). b) Call and test the function in a loop as described by the following pseudocode: Get the weight ( 1 for end). Repeat until weight is 1 Call your function and print the egg category Get another weight ( 1 for end)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
