Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- # written by pratham
- def calcBMI( h, w ):
- BMI = w / h**2
- return BMI
- def main():
- height = float(raw_input("Enter height in metres: "))
- weight = float(raw_input("Enter weight in kilos: "))
- BMI = calcBMI(height, weight)
- print "BMI = %0.1f" % BMI
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement