Python beginner,did something wrong with the code Beginner

Hey,guys,I would really appreciate your help in this task!Cannot figure out what I am doing wrong in the task.Could somebody fix the code?

In Your code you never declared variable which you use outside the function. if you want to use outside the function declared before using it.


def dog_years(name="Loal",age=6):
print(str(name)+" you are "+str(age)+" years old in dog years")
1 Like