Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PYTHON PROGRAMMING (Loop Structure): 1. Write a program to read the names, height and weight of students from the file data.txt (given below). Use the
PYTHON PROGRAMMING (Loop Structure):
1. Write a program to read the names, height and weight of students from the file data.txt (given below). Use the formula bmi weight in kg height in metre 2 to calculate the bmi of each student. Count and display the number of students in the various categories according to the table catego Underweight Normal Overweight Obese BMI Below 18.5 18.5 to less than 25 25.0 to less than 30 30.0 and above Store the names of students who are underweight and obese in two separate lists Display the names of underweight and obese students under appropriate headings The names should be displayed in alphabetical order. 2. Modify the above question to be an interactive loop, that is, the user will be prompted to enter the names, height and weight of students. The user will enter an empty string for name when there is no more student data to process a.Do not use a break statement b. Use a break statement Notepad (data.txt) king 1.78 60.8 Samuel 1.80 88.1 ash 1.68 100 Mary 1.6 42 James 1.58 70 Peter 1.70 67 Daisy 1.72 69.8Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started