You need to call health_calculator
outside of health_calculator
. Right now you’re defining a function successfully, but it never gets called.
def health_calculator(age, apples, cigs_smoked):
answer=(100-age)+(apples*2.5)-(cigs_smoked*2)
print(answer)
fjonis_data=[15, 7, 0]
health_calculator(*fjonis_data)
solved Console can’t print out my code [closed]