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 trialNicolas Tofino
416 Pointstry, expect, and else.
def add(five, eight): try: five = float(five) eight = float(eight) except: ValueError: return("None") else: return(five + eight)
I get pass until the last step... I don't know what's wrong with this step..
def add(five, eight):
try:
five = float(five)
eight = float(eight)
except: ValueError:
return("None")
else:
return(five + eight)
1 Answer
Antonio De Rose
20,885 Pointsdef add(five, eight):
try:
five = float(five)
eight = float(eight)
except ValueError:
return(None)
else:
return(five + eight)
Antonio De Rose
20,885 PointsAntonio De Rose
20,885 PointsYour logic of thinking is right, and towards getting the end goal is correct, however there are 3 issues in your code.