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

where is the placement of 'float' entered into this code challenge?

I must have missed the lecture on variable manipulation. ...... oh wait.... Do I format the syntax like this 'float(return(first+second))

trial.py
def add(float(first), float(second))
    return(fisrt+second)

1 Answer

Steven Parker
Steven Parker
231,269 Points

In the definition, you only name the parameters. You can only manipulate them inside the function. In this case, you might do it as you add them together.

And there should be a colon at the end of the "def" line.

Also check the variable spelling, it looks like you wrote "fisrt" instead of "first" on the last line.