Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Use interactive Python to: 1. Calculate the BMI (Body Mass Index) of a 5\'7-3/4\

ID: 3874901 • Letter: U

Question

Use interactive Python to:

1. Calculate the BMI (Body Mass Index) of a 5'7-3/4" person who weighs 153 pounds. Info on BMI calculation is below:

To figure your body mass index, divide your weight in pounds by your height in inches squared; then multiply the result by a conversion factor of 703. The formula is: BMI = weight in pounds / [height in inches x height in inches] x 703.

2. Set a variable named num to 25. Then write an expression that outputs the value of num-cubed (raised to the third power).

3. Set a variable named myName to your full name. Then write an expression using myName that outputs a string similar to this one:  My full name is George Washington.

4. Set a variable named word to one of your favorite words. Then write an expression using word that outputs it 13 times, all in one left-to-right line. For example, my expression outputs:

'PenultimatePenultimatePenultimatePenultimatePenultimatePenultimatePenultimatePenultimatePenultimatePenultimatePenultimatePenultimatePenultimate'

5. Set a variable named miles to a floating point number. Then write an expression using miles that outputs the number of feet in that quantity of miles.

To submit your work, simply copy/paste all five chunks of code into this assignment. Please put blank lines between each chunk and number each chunk. Use a Python comment for this if you like!

Explanation / Answer

Given below is the code for the question.
Please do rate the answer if it was helpful. Thank you

#1. Calculate BMI
height = 5*12 + (7 + 3/4) # convert 5' 7-3/4" into inches
weight = 153 #pounds
BMI = weight / (height*height) * 703
print(BMI)


#2.num to 3rd power
num = 25
cubed = 25**3
print(cubed)


#3. print name
myName = 'George Washington'
print("My full name is " + myName)

#4. print word 13 times
word = 'Batman'
print(word*13)

#5.miles to feet
miles = 5.5
feet = miles * 5280 #1 mile = 5280 foot
print(feet)

output
=====
23.433014256341824
15625
My full name is George Washington
BatmanBatmanBatmanBatmanBatmanBatmanBatmanBatmanBatmanBatmanBatmanBatmanBatman
29040.0