Python Python Basics Functions and Looping Raise an Exception

6,463 Points

when the challenge puts in bacon it does not put out baconinator
def suggest(product_idea):
    if len(product_idea) < 3:
        raise ValueError("please use more than three characters")
        return product_idea + "inator"

1 Answer

Mathieu Bouchard
Mathieu Bouchard
7,785 Points

Your return is in your if block. Therefore, it'll only be run if your input meets the if condition.

Bring it down one indentation level.