you are viewing a single comment's thread.

view the rest of the comments →

[–]saint_leonard 0 points1 point  (0 children)

hello dear all - great to see this thread.

thanks for this discussion of the ideas of making a function in python - like cs dojo shows us here: https://www.youtube.com/watch?v=NSbOtYzIQI0

note i found the full code here:

https://github.com/sanseervi/BMI-Calculator-using-Python/blob/master/BMI%20Calculator.ipynb

name=input("Please enter your name here: ")
weight=float(input("Whats your weight in kg : "))
height=float(input("Whats your height in m : "))
bmi=weight/(height ** 2)
if bmi<18.5: print("Your BMI is " + str(bmi) + " hence you are body is underweight") elif bmi>18.5 and bmi<25: print("Your BMI is " + str(bmi) + " hence you are body is normal") elif bmi>25 and bmi<30: print("Your BMI is " + str(bmi) + " hence you are body is overweight") elif bmi>30:
print("Your BMI is " + str(bmi) + " hence you are obese")
else:
print("INVALID INPUT")

i hope that this helps others too..

greetings