Question: 1) Value-returning function calculateEggSize a) Define a value-returning function that will return (not print!) the size-category (as a string) of an egg depending on the

 1) Value-returning function calculateEggSize a) Define a value-returning function that will

1) Value-returning function calculateEggSize a) Define a value-returning function that will return (not print!) 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!