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!
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
Didier Borel2,837 Points
i understand that I am being asked to make sure that my var1 and var2 are floats, but i am not quite sure, where and how to define that? also subsidiary question, can u remind me what a float is pls? is it basically a number with something after the decimal point, like 2.45 right, ? like an integer, but with a number after the decimal point.?
def add(var1,var2) return (var1+var2)
Kourosh Raeen23,732 Points
Use the float() function and pass the arguments to it:
def add(var1, var2): return float(var1) + float(var2)