# simple BMI calculator # using two functions - note the spacing *between* functions # always use at least 3 blank lines to separate them. # # noteworthy items: # - we state units of input # - deal with potential truncation! # - format the output # # written by e.bonakdarian oct 2010 # def calc_BMI(height, weight): # compute and display bmi bmi = (weight * 703.0) / (height ** 2) print 'The bmi is: %.1f' % bmi def main(): # ask user for height and weight user_height = input('Please enter your height in inches: ') user_weight = input('Please enter your weight in pounds: ') calc_BMI(user_height, user_weight) main()