Question: 5.) Write a function called pants_sizethat has a single parameter (the value will be an integer) representing a person's waist size in inches. The function

 5.) Write a function called pants_sizethat has a single parameter (the

5.) Write a function called pants_sizethat has a single parameter (the value will be an integer) representing a person's waist size in inches. The function returns a string. The string returned will be either "small", "medium", or "large" depending on the parameter value. Waist measurements that are 34 inches or larger should return large. Measurements that are 30 inches or larger, but not large enough to be in the large category, should return medium Anything smaller should return small Here are some examples of calling the function with different arguments. (The code executed is in blue, the value returned by the function is in green) pants_size (38) pants_size (34) pants_size (33) pants_size (29) pants_size (-20) pants_size (2000) -arge -large -->'medium -->small small -> -arge

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!