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
SSSSS [86.1K]
4 years ago
13

2-3 Calculating the Body Mass Index (BMI). (Programming Exercise 2.14) Body Mass Index is a measure of health based on your weig

ht. It can be calculated by taking your weight in kilograms and dividing by the square of your height in meters. Write a program that prompts the user to enter a weight in pounds and height in inches and displays the BMI. Note: One pound is 0.45359237 kilograms and one inch is 0.0254 meters. Hint: Convert the pounds entered into kilograms also convert the height in inches into meters Example: If you entered in pounds your weight as 95.5 and your height as 50 inches then the calculated BMI is 26.8573 FYI: BMI < 18.5 is underweight BMI >
Computers and Technology
1 answer:
Luden [163]4 years ago
5 0

Answer:

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

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

weight = weight * 0.45359237

height = height * 0.0254

bmi = weight / (height * height)

print("Your BMI is: %.4f" % bmi)

Explanation:

*The code is written in Python.

Ask the user to enter weight in pounds and height in inches

Convert the weight into kilograms and height into meters using given conversion rates

Calculate the BMI using given formula

Print the BMI

You might be interested in
What happens when the ignition is turned to accessory
ss7ja [257]
<span>It switches on the electric power for many convenience components of the car like car stereo, power windows, power seats and cigarette lighter. It depends on the car, if this position also switches on energy thirsty components like headlights, rear window defroster and air ventilator. </span>
5 0
3 years ago
Okay so remember that page I was advertising? At: fol ? Now it's deleted. And idk why because I was doing everything the right w
dimulka [17.4K]

Answer:

i don't think u can

Explanation:

maybe right a complaint or something

8 0
4 years ago
Baking Cookies. Sweet Dough Inc. bakes cookies—a popular dessert—based on the quantities ordered by their customers. Three raw m
Daniel [21]

Answer:

answer is E=CD^.6

Explanation:

CD is cookie dough.

E is number of eggs.

by using amount of cookie dough,we can find number of eggs.

8 0
4 years ago
Which statement will read an entire line of input into the following string object?
Solnce55 [7]

Answer:

getline(cin, address);

Explanation:

Given

String object: address

Required

Statement that reads the entire line

The list of given options shows that the programming language is c++.

Analysing each option (a) to (e):

a. cin<<address;

The above instruction will read the string object until the first blank space.

Take for instance:

The user supplied "Lagos state" as input, only "Lagos" will be saved in address using this option.

b. cin address:

This is an incorrect syntax

c. getline(cin,address);

Using the same instance as (a) above, this reads the complete line and "Lagos state" will be saved in variable address

d. cin.get(address);

address is created as a string object and the above instruction will only work for character pointers (i.e. char*)

<em>From the above analysis, option (c) is correct.</em>

6 0
3 years ago
The role of the
ElenaW [278]

Answer:

Tcp

Explanation:

8 0
3 years ago
Other questions:
  • Akira has trouble reading what is on the computer screen and sometimes seeing pictures on websites. As her friend, you explain t
    8·1 answer
  • This folder is ndownload and it isn't like download file
    14·1 answer
  • _____ is a component of a data model that defines the boundaries of a database, such as maximum and minimum values allowed for a
    12·1 answer
  • Word, by default, places a tab stop at every ____ mark on the ruler.
    6·1 answer
  • Write a for loop to print all elements in courseGrades, following each element with a space (including the last). Print forwards
    9·1 answer
  • Discuss the importance of top management commitment and the development of standards for successful project management. Provide
    10·1 answer
  • PLEASE HELP! Please dont answer if your going to guess
    14·2 answers
  • PLEASE HELP me with at least 1 of the problems in the picture <br><br>We are coding using python​
    14·1 answer
  • ? Question<br> How are the Internet and the World Wide Web different from each other?
    11·1 answer
  • What do you do when you have computer problems? Check all that apply.
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!