Question

How to make a code that would calculate a BMI in PYTHON. BMI=703 X(weight divided by...

How to make a code that would calculate a BMI in PYTHON. BMI=703 X(weight divided by height^2) Label 1 needs to say "Your BMI is:" and below that there needs to be a commentLabel that says either "You are in good shape! or if the BMI is over 25, it needs to say "You weigh too much".

name contrants are BMI_FACTOR 703, CUT OFF IS 25, GOOD_MESSAGE IS "You're in good shape!", BAD_MESSAGE IS "You weigh too much!"

variables needed are dblHeight, dblWeight, dblMessage, dblBMI.

Homework Answers

Answer #1
dblWeight = eval(input("Enter weight: "))
dblHeight = eval(input("Enter height: "))
dblBMI = dblWeight * 703 / dblHeight ** 2
print("Your BMI is:", dblBMI)
if dblBMI<=25:
    dblMessage = "You're in good shape!"
else:
    dblMessage = "You weigh too much!"
print(dblMessage)

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
PYTHON : Create a Email Address Parser (* Please do make comments*) Often times, you may...
PYTHON : Create a Email Address Parser (* Please do make comments*) Often times, you may be given a list of raw email addresses and be asked to generate meaningful information from such a list. This project involves parsing such a list and generating names and summary information from that list. The script, eparser.py, should: Open the file specified as the first argument to the script (see below) Read the file one line at a time (i.e., for line in...
Use Python 3.8: Problem Description Many recipes tend to be rather small, producing the fewest number...
Use Python 3.8: Problem Description Many recipes tend to be rather small, producing the fewest number of servings that are really possible with the included ingredients. Sometimes one will want to be able to scale those recipes upwards for serving larger groups. This program's task is to determine how much of each ingredient in a recipe will be required for a target party size. The first inputs to the program will be the recipe itself. Here is an example recipe...
Write a Python 3 program called “parse.py” using the template for a Python program that we...
Write a Python 3 program called “parse.py” using the template for a Python program that we covered in this module. Note: Use this mod7.txt input file. Name your output file “output.txt”. Build your program using a main function and at least one other function. Give your input and output file names as command line arguments. Your program will read the input file, and will output the following information to the output file as well as printing it to the screen:...
convert to python 3 from python 2 from Tkinter import * # the blueprint for a...
convert to python 3 from python 2 from Tkinter import * # the blueprint for a room class Room(object): # the constructor def __init__(self,name,image): # rooms have a name, exits (e.g., south), exit locations (e.g., to the south is room n), # items (e.g., table), item descriptions (for each item), and grabbables (things that can # be taken and put into the inventory) self.name = name self.image = image self.exits = {} self.items = {} self.grabbables = [] # getters...
Jocko Johnson Age Gender Height Weight Body Fat % 30 Male 73 inches 200 18 Jocko...
Jocko Johnson Age Gender Height Weight Body Fat % 30 Male 73 inches 200 18 Jocko was an athlete in high school playing a variety of sports including football, track (100- 400 meter events) and baseball. He has come to you because he has recently had his 30 th birthday and wants to get back in shape. While he is in decent shape already, Jocko wishes to get in excellent shape with an eye on perhaps competing in a local...
Powerpoint slides for COPD with the given case study by using CRC. Ms Aaliyah Abimbola Background...
Powerpoint slides for COPD with the given case study by using CRC. Ms Aaliyah Abimbola Background information for the assignment. You are the RN on a morning shift on the respiratory ward of a large inner-city hospital. At 10:30 AM you receive a patient from the Emergency Department. This is the hand-over you receive. I My name is Catriona and I am the A&E RN who has been caring for Ms Aaliyah Abimbola. Thank you so much for taking this...
Ms Aaliyah Abimbola Background information for the assignment. You are the RN on a morning shift...
Ms Aaliyah Abimbola Background information for the assignment. You are the RN on a morning shift on the respiratory ward of a large inner-city hospital. At 10:30 AM you receive a patient from the Emergency Department. This is the hand-over you receive. I My name is Catriona and I am the A&E RN who has been caring for Ms Aaliyah Abimbola. Thank you so much for taking this patient so quickly. We’re so busy we haven’t time to do much...
You are the RN on a morning shift on the respiratory ward of a large inner-city...
You are the RN on a morning shift on the respiratory ward of a large inner-city hospital. At 10:30 AM you receive a patient from the Emergency Department. This is the hand-over you receive. I My name is Catriona and I am the A&E RN who has been caring for Ms Aaliyah Abimbola. Thank you so much for taking this patient so quickly. We’re so busy we haven’t time to do much for her apart from get her ready to...
Powerpoint slides for COPD with the given case study by using CRC. Ms Aaliyah Abimbola Background...
Powerpoint slides for COPD with the given case study by using CRC. Ms Aaliyah Abimbola Background information for the assignment. You are the RN on a morning shift on the respiratory ward of a large inner-city hospital. At 10:30 AM you receive a patient from the Emergency Department. This is the hand-over you receive. I My name is Catriona and I am the A&E RN who has been caring for Ms Aaliyah Abimbola. Thank you so much for taking this...
Powerpoint slides for COPD with the given case study by using CRC. Ms Aaliyah Abimbola Background...
Powerpoint slides for COPD with the given case study by using CRC. Ms Aaliyah Abimbola Background information for the assignment. You are the RN on a morning shift on the respiratory ward of a large inner-city hospital. At 10:30 AM you receive a patient from the Emergency Department. This is the hand-over you receive. I My name is Catriona and I am the A&E RN who has been caring for Ms Aaliyah Abimbola. Thank you so much for taking this...