I have an assignment in my first CSC class which is focused around Python 3. This is my second batch of code, so pardon if it's elementary.
The assignment is to create a BMI calculator. A BMI is found by a person’s weight in (pounds) times 720.0 , divided by the square of the person’s height (in inches).
The requirements are: Prompt user to enter his/her weight in pounds. Prompt user to enter part of height in feet. Prompt user to enter part of height in inches. Tell whether user is above or within or below the healthy range. (19-25)
Here is my code so far:
#problem1_<tomjenk>.py
#A program used to calculate range of BMI.
import math
def main():
print("BMI Calculator")
print()
print("Please fill out the following:")
x = eval(input("Your weight in pounds: "))
y = eval(input("Your Height in feet: "))
z = eval(input("Your remainder inches: "))
q = y / 12.0
f = x * 720.0
t = q + z
d = math.sqrt(t)
total = f / d
print("Total", total)
main()