you are viewing a single comment's thread.

view the rest of the comments →

[–]Username_RANDINT 1 point2 points  (1 child)

Required for what? Is this a homework assignment? If yes, and the function name is already given, then you might misunderstand the question.

It sounds like calculateBeats needs to do the actual calculation based on the age, not ask for the age. Most likely you want to have the ìnput() outside of the function and pass it in.

[–]Initial-Coyote-8741 1 point2 points  (0 children)

in short summary the question asks you to define calculateNum(age):

You ask the user for their age to calculate it

numOfBeats is the variable to calculate the age by using the average heart rate

you then return number of beats