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 trialmamadou diene
Python Web Development Techdegree Student 1,971 PointsYou're doing great! Just one more task but it's a bigger one. Right now, we turn everything into a float. That's great
i am not moving forward with this one i can't seem to find the issue
def add(num1, num2):
try:
return float(num1) + float(num2)
except ValueError:
return None
else:
return float(num1) +float(num2)
2 Answers
Henrik Christensen
Python Web Development Techdegree Student 38,322 PointsIt should be like this:
def add(num1, num2):
try:
return float(num1) + float(num2)
except ValueError:
return None
else:
return float(num1) +float(num2)
and not like this:
def add(num1, num2):
try:
return float(num1) + float(num2)
except ValueError:
return None
else:
return float(num1) +float(num2)
Henrik Christensen
Python Web Development Techdegree Student 38,322 PointsYou already got the answer here
But the problem is that your code is not indented correctly.
mamadou diene
Python Web Development Techdegree Student 1,971 PointsI can't find where the issue with the identatioon. Please help
mamadou diene
Python Web Development Techdegree Student 1,971 Pointsthank you for your help it worked