Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python Basics (2015) Logic in Python Try and Except

Can someone explain how I am supposed to word this?

I Know what they are asking of me, but I don't know how to say it. how do I add arguments together?

trial.py
def add(5, 6):
    print(5 + 6)
    return(5 + 6)

1 Answer

Thomas Fildes
Thomas Fildes
22,687 Points

Hi Miguel,

You don't need to put values inside the parenthesis. You only need to place two parameters (e.g. num1 and num2). Then inside the code block of the function you will add num1 and num2 together and return the total. Functions are to be used whenever they are called which is why we use parameter names and not values inside the parenthesis.

Here is the code I used to pass this part of the challenge:

def add(num1, num2):
    total = (num1 + num2)
    return total

Hope this helps! Happy Coding!!!