Hello, for the health calculator, using the formula, if I want to add a range to determine if a person is healthy or not:
def health_calculator(age, calories_intake, exercise_time):
health_indicator = (age*2) + (calories_intake - 2000) + (exercise_time)
Guest_Data = [25, 3000, 30]
if health_indicator() > 1000:
print('you are healthy')
I got the number out for the health_indicator, but I cannot print out the 'you are healthy' part.
Addition of arguments to Tutorial 18
Post a Reply
|Oldest Newest Rating|
· July 7, 2015
@Tee , also take note of your indentation as your print statement was not properly indented. Little things like that can cause problems for python.
Tee Yong Ng
· July 2, 2015
oh yeah it works thanks!
· July 1, 2015
Your health_calculator function needs a return statement, that way it can calculate the result and you can compare it against 1000...
This section is all about snakes! Just kidding.
|Bucky Roberts Administrator|