Welcome to the Treehouse Community
Looking to learn something new?
trial task 3
help please? trial task 3
def add(number1, number2): try: number1 = float(number1) number2 = float(number2) except ValueError: returne None return(number1 + number2)
Looking at your code you are very close!
Just some issues and mistake. First, this part from your code needs adjustment.
try: number1 = float(number1) number2 = float(number2)
When you write try your code that is inside the try needs to be indented. Right now your two codes are not indented.
Second, the task want you to write else: so if you write else: before you write return (number1+number2) you will be spot on!
Hope this helps!