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
________ is the main processing circuitry within a computer that contains the ALU, control unit, and registers.
labwork [276]

Answer:

The correct answer to the following question will be "CPU".

Explanation:

Central Processing Unit, the computer's heart or nucleus is CPU. A basic processor includes controlling circuits for retrieving and implementing commands, an ALU for manipulation of data, and registers for processor activity management and a limited amount of information.

The CPU itself is composed of many vertices, each performing a useful and unique role in the processor's overarching function. Those sub-units are as follows:

  • ALU (Arithmetic Logic Unit)
  • CU (Control Unit)
  • Registers

Therefore, CPU is the right answer.

3 0
3 years ago
Python problem:
KATRIN_1 [288]

print("Think of a number from 1 to 4")

print("Answer S (yes) or N (no) to my questions.")

choice = input("Is the number thought to be greater than 2? ")

if choice == "S":

   choice = input("Is the number thought to be greater than 3? ")

   if choice == "S":

       print("The number thought about is 4")

   elif choice == "N":

       print("The number thought about is 3")

elif choice == "N":

   choice = input("Is the number thought to be greater than 1? ")

   if choice == "S":

       print("The number thought about is 2")

   elif choice == "N":

       print("The number thought about is 1")

print("See you next time!")

This works for me. Best of luck!

3 0
3 years ago
Which of the following projections is typically used for navigation?
kondor19780726 [428]
D. orthographic is the answer

5 0
4 years ago
Read 2 more answers
How could the provisions in the new health reform bill improve access to care?
VashaNatasha [74]
The Affordable Care Act will significantly change health coverage and care, bringing us closer to the goal of high-quality, affordable health insurance for all Americans. The law:

expands Medicaid to more low-income Americans
creates health insurance marketplaces (also known as "exchanges") where consumers can buy high-quality, affordable private plans
protects consumers by eliminating coverage denials for people with pre-existing conditions, requiring health insurance companies to spend the majority of premium dollars on health care, offering free preventive services, and more
4 0
4 years ago
A bank is developing an algorithm that will help them decide who to make loans to. As input the algorithm will consider informat
k0ka [10]

Answer: A

Explanation:

Just took this and got it right

7 0
3 years ago
Read 2 more answers
Other questions:
  • Your computer is taking longer than usual to open files and you noticed that your hard drive light stays on longer than usual wh
    14·1 answer
  • How does an ALU perform logical operations?
    6·1 answer
  • Each object that is created from a class is called a(n) ____________ of the class.
    5·2 answers
  • Community gardens are public gardens where local residents can grow plants in a plot. They are very popular, so there are often
    7·1 answer
  • How do i make a PDF and what is a PDF<br><br> sorry i am dumb
    14·1 answer
  • Under what circumstances will the indented line of code immediately after an if statement be executed?
    14·1 answer
  • Future quirk ideas for bnha
    9·2 answers
  • the guest would like to convert his 100 dollar to peso.How much will the guest receive if the exchange rate is 1 dollar=Php 50.5
    11·2 answers
  • When using the red / yellow I green method to present status of a project, green can mean which of the following?
    15·2 answers
  • 6. Write a C++ program to print the largest three elements in an array. <br>​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!