1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Stella [2.4K]
3 years ago
12

How do we calculate the BMI in python? the formula is kg/m²

Computers and Technology
1 answer:
Igoryamba3 years ago
3 0

Answer:

height = float(input("Enter your height in m: "))

weight = float(input("Enter your weight in kg: "))

BMI = weight / (height/100)**2

print(f"You BMI is {BMI}")

Explanation:

The python code for calculating BMI is as follows -

height = float(input("Enter your height in m: "))

weight = float(input("Enter your weight in kg: "))

BMI = weight / (height/100)**2

print(f"You BMI is {BMI}")

Some conditions can also be added such as

if BMI <= 15:

   print("You are underweight.")

elif BMI <= 30:

   print("You are healthy.")

elif BMI <= 40:

   print("You are over weight.")

You might be interested in
Changes in computer technology have an effect on _____. computer scientists only people who work with computers only everybody p
luda_lava [24]
Changes in computer technology have an effect on <span>everybody.</span>
6 0
4 years ago
Read 2 more answers
Resources that can be saved through the use of computers​
Leona [35]

Answer:

Yes. That's what the internet is all about. Saving resources through interconnected computers.

6 0
3 years ago
In which direction streams can send data?
Schach [20]

Answer: streams can send data in only one direction either input or output.

Explanation:

An application must have two network streams in order to send and receive data.

for example if we want to send data from A to B we must have one stream similarly in order to receive data from B to A we must have another network stream.

3 0
4 years ago
What are the steps to configure user information in a document?
Svetach [21]

Answer: Step 1: Navigate to the document library where you would like to enable a Document Information Panel. Step 2: From Ribbon, click on settings to navigate to Library settings Page. Step 3: In the library Settings, you have to update the setting of content type. Enable management of content type if not already done.

6 0
3 years ago
Read 2 more answers
Write a program that prompt the user to enter a bank balance. The balance entered by the user is read into a variable named bala
IRINA_888 [86]

Answer:

ertyuiopoijuhgfdsa hiyoufun tresdfghytrefgytredfg

Explanation:

look for the words

4 0
3 years ago
Other questions:
  • In addition to offering word excel PowerPoint and one note the office home and business edition also offers
    5·1 answer
  • To view the contents of a file that was compressed with the bzip2 utility, you must used the ____________________ command.
    9·1 answer
  • Once a graph has been created, you would need to start over to make any changes to it?
    5·1 answer
  • An interface is a class that contains only the method headings and each method heading is terminated with a semicolon. True Fals
    7·1 answer
  • What’s the best description of an opportunity cost
    5·1 answer
  • I need it ASAP, brainliest to whoever answers correctly!
    10·1 answer
  • What does the revolver do computer science​
    9·1 answer
  • You are supposed to do a report on something that interests you. You decided to do a report on dogs. As you research, you take n
    14·1 answer
  • What are the advantages of cloud computing over computing on premises?
    10·1 answer
  • on early ethernet networks, all computers were connected to a single wire, forcing them to take turns on a local area network (l
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!