Welcome to the Treehouse Community
Looking to learn something new?
can you help with code. what is wrong here
def add(here, there): add (10, 10) try: int(add) except ValueError: return('None') else: return(float(here)+float(there))
hello, in the challenge he asks us to convert the two arguments to floats inside the try block before adding them together. Also, the indentation for except should match try and else. Here is one way to do it.
def add(a, b): try: a = float(a) b = float(b) except ValueError: return None else: return a + b
Thank Jeremiah :) it worked