Question: Write a Python program that calculates the average height and weight of students from a dictionary and categorizes them into Tall or Heavy based on

Write a Python program that calculates the average height and weight of students from a dictionary and categorizes them into "Tall" or "Heavy" based on specified thresholds. The original dictionary contains student names as keys and tuples with height (in feet) and weight (in kg) as values.
Your program should accomplish the following tasks:
1. Calculate the average height and weight of the students.
2. Prompt the user to enter thresholds for height and weight.
3. Categorize each student as "Tall" if their height is above the height threshold and "Heavy" if their weight is above the weight threshold.
4. Create two separate lists: one containing the names of tall students and another containing the names of heavy students.
5. Display the average height and weight, and the lists of tall and heavy students.
Note: comment each line of code to explain the code, otherwise Zero marks will be given.

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 Computer Network Questions!