Question

Calculate the BMI of a person using the formula: BMI = ( Weight in Pounds ((Height in inches ) x (Height in inches ))) x 703


Assume that print_error_description is a function that expects one integer parameter and returns no value. Write a statement


Python solutions please. correct code for Thumbs Up.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:

# weight in pounds

w=100

# height in inches

h=6

# calculating bmi

bmi=(w/(h*h))*703

# print bmi

print(bmi)

Editor:

main.py 1 # weight in pounds 2 w=100 3 # height in inches 4 h=6 5 # calculating bmi 6 bmi=(w/(h*h))*703 7 # print bmi 8 print

1952.7777777777776

2.

#defininng the function which takes an integer value as paramter

def print_error_description(val:int):

#it wont do anytihig

pass

#calling the function

print_error_description(14)


Editor:

1 main.py #defininng the function which takes an integer value as paramter 2 def print_error_description(val:int): 3 #it wont

Hope this helps you! If you still have any doubts or queries please feel free to comment in the comment section.

"Please refer to the screenshot of the code to understand the indentation of the code".

Thank you! Do upvote.

Add a comment
Know the answer?
Add Answer to:
Python solutions please. correct code for Thumbs Up. Calculate the BMI of a person using the...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • BMI is often used to determine whether a person with a sedentary lifestyle is overweight or...

    BMI is often used to determine whether a person with a sedentary lifestyle is overweight or underweight for their height. A person’s BMI is calculated with the following formula: BMI = (weight * 703) / height2 In the formula, weight is measured in pounds and height is measured in inches. Create a VB application to calculate a user’s BMI by allowing users to enter their weight and height in the appropriate units. Display their BMI with an appropriate control. Display...

  • python2.7 25 Points. Create a class named BMIGUI with the following behavior. A template has been...

    python2.7 25 Points. Create a class named BMIGUI with the following behavior. A template has been provided for you and you cannot modify the template. You must use grid) to format the interface and you must get as close as possible the layout shown below. The entry box has a width parameter in its constructor you can use to make the box smaller 3. The BMI categories are as follows: Underweight= <18.5 Normal weight18.5-24.9 . Overweight 25-29.9 Obese BMI of...

  • + Run C Code IMPORTANT: • Run the following code cell to create the input file,...

    + Run C Code IMPORTANT: • Run the following code cell to create the input file, biostats.csv, which you will be using later. 74, In [ ]: N %%file biostats.csv Name, Sex, Age, Alex, M, 41, Bert, M, 42, Dave, M, 39, Elly, F, 30, Fran, F, 33, Jake, M, F, Luke, M, 34, F Myra, M, M, 38, Ruth, F, 28, 22 22 323 47 47, Height, Weight 170 200 167 70 115 143 139 280 98 75, 350...

  • Please write this code in python programming and provide a screen short of the code. Reading:...

    Please write this code in python programming and provide a screen short of the code. Reading: P4E 7; Tut 7.2, 7.2.1 Upload an original Python script that satisfies the following criteria: It has at least two functions Function 1: This function has one parameter, a string containing the path to an existing text file that will be read by your function Using a with statement, the function opens the file indicated by the parameter for reading The function counts the...

  • Please solve the following, please type out the code, and do not hand write because its...

    Please solve the following, please type out the code, and do not hand write because its hard to read. I would greatly appreciate it. (JAVA) Problem 1 In a class called H1P1, write a method called bmiOne that takes as arguments a mass in kilograms (a double) and a height in meters (also a double), and returns the body mass index (or BMI) for the given data. If we have mass -m kg and height-h meters, then BMI = Write...

  • Please write this code in C++ Object-Oriented Programming, specify which files are .h, and .cpp, and...

    Please write this code in C++ Object-Oriented Programming, specify which files are .h, and .cpp, and please add comments for the whole code. Include a class diagrams, and explain the approach you used for the project and how you implemented that, briefly in a few sentences. Please note the following: -Names chosen for classes, functions, and variables should effectively convey the purpose and meaning of the named entity. - Code duplication should be avoided by factoring out common code into...

  • Written in python programming for MyProLab :) Please use simple code Assume the availability of a...

    Written in python programming for MyProLab :) Please use simple code Assume the availability of a function called printStars. The function receives an integer value as an argument. If the argument is positive, the function prints (to standard output) the given number of asterisks. Thus, if printStars(8) is called, ******** (8 asterisks) will be printed. Assume further that the variable starCount has been declared and initialized with an integer value, possibly negative or zero. Write some code that does nothing...

  • python rephactor 1. Write code that prints the square root of the value in the variable...

    python rephactor 1. Write code that prints the square root of the value in the variable num rounded to 4 decimal places. Assume that num already has a value and that the math module has been imported. 2. Write a function called ordinal_sum that accepts a string argument and returns the sum of the ordinal values of each character in the string. The ordinal value of a character is its numeric Unicode code point in decimal.

  • Python. Just work in the def sierpinski. No output needed. Will give thumbs up for any attempt beginning this code. Your task is to implement this algorithm in Python, returning a random collection of...

    Python. Just work in the def sierpinski. No output needed. Will give thumbs up for any attempt beginning this code. Your task is to implement this algorithm in Python, returning a random collection of inum-100, 000 points. You should then plot the points to see the structure. Please complete the following function: def sierpinski (po, v, f, inum) The four arguments are ·po the initial point. You may assume this is the origin, i.e., po = [0, 0] . v:...

  • please help me solve this in python my solution doesn't work Instructions Assume the variable date...

    please help me solve this in python my solution doesn't work Instructions Assume the variable date has been set to a string value of the form mm/dd/yyyy, for example 10/08/2010. (Actual numbers would appear in the string.) Write a statement to assign to a variable named dayStr the characters in date that contain the day. Then set a variable day to the integer value corresponding to the two digits in dayStr. Submit History: (17 of 17) 05/04/2012:09:55 - 1 date...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT