Functions Calling Functions help needed


#1



https://www.codecademy.com/courses/python-beginner-c7VZg/1/4?curriculum_id=4f89dab3d788890003000096#


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


#3

Hi,

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

#4

Thank you that worked!


#5

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