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]
3 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]3 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
Jeremy is designing a website for a florist. He intends to discuss the web design with his client. Which tool should Jeremy use
stiv31 [10]

Answer:

C.  layout of each page with its respective elements

Explanation:

A layout  of each page with its respective elements will give the client a good idea of the final product and help him confirm his desires/requests towards the creation of the Web site.  Most people are visual, especially about things they don't fully understand, so a clear and visual representation is best.

<u>A. Bulleted lists and titles</u>... won't give the idea of the full layout of the Web site.

<u>B. chart depicting</u>....  that's more a tool for the programmer than the client, although user flow is important, it isn't as much as the visual aspect of each page.

<u>D. pictures and screenshots of websites of other florists..</u>. That could be a useful aid on the first contact, but the question implied the Web site is already in progress... so that wouldn't help much.

<u>E.  programming code for the website</u>, absolutely not, the client hired Jeremy not to have to deal with that.

5 0
3 years ago
Using the scenario below, answer the following questions:
4vir4ik [10]

Answer:

Here is code in java.

import java.util.*;

class Main

{

public static void main (String[] args) throws java.lang.Exception

{

   try{

         boolean flag=false;

         int total_mile=0;

         double avg_mile;

       // part 1, create and initialize array

       int inp[]={2,5,9,11,13,17,20,22,24,26};

       

       System.out.print("miles ran per week: ");

       // print the miles per week of train

       for(int x=0;x<10;x++)

       {

       System.out.print(inp[x]+" ");

       }

        System.out.println();

       //part 2, print the value of index 2 in the list

       System.out.println("value at index 2: "+inp[2]+" miles");

       //part 3, find length of array

       System.out.println("list length: "+inp.length);

     

       // part 4, calculate total mile and average

       for(int y=0;y<10;y++)

       {

       total_mile=total_mile+inp[y];

       }

       System.out.println("total miles ran: "+total_mile+" miles");

       

       avg_mile=total_mile/10.0;

       System.out.println("average no of miles ran= "+avg_mile+" miles");

       

     // part 5, check 4 exist in the list or not

       for(int k=0;k<10;k++)

       {

       if(inp[k]==4)

       {

       flag=true;

       break;

           }

       }

           if(flag)

           System.out.println("4 exist in the list.");

           else

            System.out.println("4 doesn't exists in the list.");  

       

   }catch(Exception ex){

       return;}

}

}

Explanation:

Create and initialize array with list value equals to 2 and maximum value 26. Print the miles of each week.Then find the value of miles at index 2 in the list.Next find the length of the array and print it.Calculate total miles ran of 10 weeks.Then calculate the average miles by dividing the total with 10. In the array, check 4 exist or not.

Output:

miles ran per week: 2 5 9 11 13 17 20 22 24 26                                                                            

value at index 2: 9 miles                                                                                                  

list length: 10                                                                                                            

total miles ran: 149 miles                                                                                                

average no of miles ran= 14.9 miles                                                                                        

4 doesn't exists

3 0
3 years ago
Electronic components in coputers process data using instructions, which are the steps that tell the computer how to perform a p
Dominik [7]

Answer:

True

Explanation:

  • True, the electronic components perform the tasks that are given to the computer.
  • The computer is made up of nothing but the electronic components like Transistors, Circuits etc.  
  • Electronic components are the building blocks of the computer.
  • So essentially all the tasks performed by the computer are actually performed by the electronic components inside it.
  • So it can be understood that the tasks that are given to the computer are performed by the electronic components. They perform the tasks with the instructions given to the computer.  
  • There also special electronic components designed to read, write and perform the tasks given to the computers.
  • The electronic components comprise of the circuits, transistors, resistors and capacitors.
3 0
3 years ago
I'm trying to export a video with HitFilm Express, I am either unable to click the export button or it gets to 43% and just stop
fiasKO [112]

Answer:

Yea I am also confused oof

8 0
2 years ago
3.5 lesson practice quiz Edhesive
erik [133]

Answer:

                                                                                     

Explanation:

6 0
2 years ago
Read 2 more answers
Other questions:
  • Jennifer has been hired as a temporary employee at a local college. She is given a username and password to access certain parts
    14·2 answers
  • After reviewing the various types of network connections available, a client chooses a network connection that is considered to
    13·1 answer
  • In the MOV instruction both operands i.e. source andthe destination cannot be
    15·2 answers
  • How do you change your age on here? I accidentally put that i was 15 but i am only 13. How do I change this?
    12·1 answer
  • A company has two geographically separate locations that need to connect using a VPN. Which of the following devices must be spe
    7·1 answer
  • Is the internet a private place?
    15·2 answers
  • B. What significant values have you learned while learning the tools and utensils?
    8·1 answer
  • Write a function template that accepts an argument and returns its absolute value. The absolute value of a number is its value w
    11·1 answer
  • Which of the following is not a bus type A. Address bus B. Data bus C. Memory bus D. Control bus ​
    7·2 answers
  • Which of the following is typiacally the last step of the mail merge process
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!