Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

how would i loop this in python import math #importing to perform math functions #function to get weight input from user def getWeight(): weight=input('Please enter

how would i loop this in python

import math #importing to perform math functions #function to get weight input from user def getWeight(): weight=input('Please enter weight ') return weight #function to get height input from user def getHeight(): height=input('Please enter Height ') return height #function to calculate BMI def calculateBMI(): BMI=(float(weight)*703/(math.pow(float(height),2))) return BMI #function to Display weight,height and BMI def displayResult(): print('Weight ',weight) print('Height ',height) print('BMI ',BMI) #calling functions weight=getWeight() height=getHeight() BMI=calculateBMI() displayResult()

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions