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

Julie Egan
PLUS
Julie Egan
Courses Plus Student 703 Points

Im stuck again :( what is wrong with that code?

i even had a look on our community to cheat but still doesnt work :( can someone help please.

trial.py
def add(3, 3):
    return 3 + 3

3 Answers

Hello Julie, it appears that add will only accept an argument, not an integer.

Therefore, add two arguments like so:
def add(arg1, arg2): return arg1 + argv2

Julie Egan
Julie Egan
Courses Plus Student 703 Points

thanks codingtime i still don't get it though, everywhere i look the code looks the same but result still wrong.

Julie Egan
PLUS
Julie Egan
Courses Plus Student 703 Points

I need you to make a new function, add. add should take two arguments, add them together, and return the total.

thats the challenge...sorry i forgot to add on my post!

Hey Julie,

The output that I'm typing is not being displayed as I would like it to be. Even using the markdown cheatsheet emphasis. Basically, type that info in the same format you typed your above question, but instead of having the number 3 as an argument, type out two arguments. arg1 and arg2 are examples, but you can use anything. However, I was able to pass the quiz with that example.