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 trialDmitry Kozloff
1,371 PointsTry and Except
I am trying to run below (or anything similar) for the last Task in "Try and Except" exercise. Always get "Bummer! message, tries numerous options. Any idea?
def add(n1,n2): try: count = (float(n1+n2)) except ValueError: return("None") else: return(float(n1) + float(n2)) add(7,3)
def add(n1,n2):
try:
count = float(input(n1)) + float(input(n2))
except ValueError:
return("None")
else:
return(count)
add(7,3)