Def question

In the following exercise the program requires to def my_age but the parameter is not obvious (at least to me). And the Solution provided by the program does not address it— it just doesn’t exist in the code. Any help on this is appreciated.

def calculate_age(current_year, birth_year):
age = current_year - birth_year
return age

def my_age(?):
my_age = calculate_age(2049, 1993)
dads_age = calculate_age(2049, 1953)
print(“I am” +str(my_age) + “years old and my dad is” +str(dads_age) +“years old”)

By ‘define’ could it mean declaring variables? You have done that so the above line could likely be removed.

Thanks. Agree. But I receive an error statement “Did you remember to define my_age ?” which leads me to this question. The Solution does not include a def my_age(): variable so not sure why I am receiving this message?

We cannot tell where your indentations are. Could that be a problem we can’t see?

Perfect— that solved it. Sorry for bone head question. Thanks for the help!

1 Like

No question is dumb! :smile: