I am very new to python and I just want to write a simple program that calculates BMI using a simple function with arguments...It just tells me that my first "height" syntax is wrong. Help please :)
Code:
# This program calculates a person's Body Mass Index
def main():
intro()
weight = input(int('What is your weight in pounds? ')
height = input(float('What is your height in inches? ')
print('Your BMI or Body Mass Index is: ')
bmi(weight, height)
def intro():
print('This program calculates your Body Mass Index')
print('which helps you determine if you are at a healthy weight')
print('Underweight is below 18.5')
print('Healthy weight is 18.5 to 24.9')
print('Overweight is 25 to 29.9')
print('Obese is above 30')
def bmi(weight, height):
bmi = weight * 703 / height**2
print(bmi)
main()
Comment