Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a function to reset the BMI calculator fields back to default values and call this function when Reset button is clicked. (1 mark) Design

image text in transcribed

Create a function to reset the BMI calculator fields back to default values and call this function when Reset button is clicked. (1 mark) Design the graphical user interface (GUI) for a BMI calculator with the following fields: a) BMI Calculator should accept the username. b) User can pick his/her gender through drop-down menu. (2 marks) c) User should enter his weight and height using text fields. (2 marks) d) Use slider control to input user age. (1 mark) e) User can enter weight in kilograms (kg) or pounds (lbs). A checkbox can be used to check whether the weight is entered in pounds or not. If checkbox is checked, it means the weight is entered in pounds. (1 mark) f) Show two horizontal buttons with "Calculate BMI" and "Reset" text. (2 marks) g) A hidden label which will display the BMI result. (1 mark) a) Create a function in python and call this function when Calculate BMI button is clicked. The function will perform the following tasks: a. Validate the name, weight, and height fields. Display appropriate message in the label that the required fields cannot be left blank. (1 mark) b. If weight is given in pounds, then convert the weight in kilograms using the following formula: (1 mark) Weight = Weight 0.4535 c. Calculate BMI using the following formula. (1 mark) BMI = weight / (Height * Height) d. Display username, BMI and interpret BMI result as under-weight, normal, overweight, obese. (1 mark)

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

Oracle 10g SQL

Authors: Joan Casteel, Lannes Morris Murphy

1st Edition

141883629X, 9781418836290

More Books

Students also viewed these Databases questions