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
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?
def add(5, 6):
print(5 + 6)
return(5 + 6)
Thomas Fildes22,453 Points
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)
Hope this helps! Happy Coding!!!