Functions Calling Functions help needed


Oops, try again. It looks like your deserves_another function returns 2 instead of 3 when we call deserves_another(0)

def one_good_turn(n):
    return n + 1
def deserves_another(one_good_turn):
    return one_good_turn + 2



since the function is defined as "one_good_turn(n)", you may use exactly the same expression in your "deserves_another" function.

Try using this:

def deserves_another(n):
    return one_good_turn(n) + 2


Thank you that worked!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.