#calculation of daily calorie needed in women
weight = float(input("please enter your weight in kg: n" ))
height = int(input(" please enter your height : n"))
age = input(" please enter your age :n")
activity_level = input(" please enter your activity level : ( lightly active , moderately active , very active ) n" )
formula = 655.1 + (weight*9.563) + (height*1.850) - (age*4.676)
lightly_active = formula*1.375
moderately_active = formula*1.55
very_active = formula*1.9
if activity_level == "lightly active" :
print(lightly_active)
elif activity_level == "moderately active" :
print(moderately_active)
else :
print(very_active)
the code is about calculation of daily calorie needed in woman .
i have value error in line 2 (Value Error: invalid literal for int() with base 10: ‘1.66’).
i could not solve it .
New contributor
Mia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1