Functions: Fundamentals

I am finding difficulty getting the right answer to the question as the one provided is not working or is not the right one. Please help

Hi @mokayamakori2050. It’s difficult to say what the issue might be based on the information you’ve provided so far. When I click on the link, it takes me to the mission, but I’m only able to see my own code and not yours. It will help us to help you get know what code you entered and what outputs or error messages you’re seeing so someone in the community might be able to assist. Here is a guide for asking questions that get quicker responses by other members.

Just in case this might be the issue, you’ll want to make sure you’re connected to the virtual machine when submitting code, as sometimes this is a reason the code is not accepted even when copying and pasting the given solution. Another thing to try is to reset the code and start again.

def add_10(a_number):
result = number + 10
return result
add_30 = add_10(number = 30)
add_90 = add_10(number = 90)

the above is my code and it is giving my answers as :
TypeErrorTraceback (most recent call last)
in ()
2 result = number + 10
3 return result
----> 4 add_30 = add_10(number = 30)
5 add_90 = add_10(number = 90)

TypeError: add_10() got an unexpected keyword argument ‘number’

the link to the question is :

Thanks for the code snippet! I think I see the problem. When you defined your function, you called the input variable a_number. However in the rest of the function, and when you call it, you are using number (result=number+10). You’ll want these all to match, so the easiest fix is to change your function so that it says def add_10(number):.

I hope that helps!