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
Rolando Aguilera4,662 Points
Converting an int to a floating type number before using the converted floated point number in a function!
what's the correct syntax in order to pass the challenge? Thank you very much!!!
def add(x,y): return(x+y) c=add(float((4,5)) print(c)
Thomas Fildes16,201 Points
This isn't as complicated as you think. Here is some code below that I used to pass this part (task 2) of the challenge:
def add(x,y): total = float(x) + float(y) return total
Hope this helps! Happy Coding!!!