Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial Analysis with Microsoft Excel

Authors: Timothy R. Mayes, Todd M. Shank

7th edition

1285432274, 978-1305535596, 1305535596, 978-1285432274

More Books

Students also viewed these Computer Network questions

Question

When do you think a hiring decision will be made?

Answered: 1 week ago