Python Python Basics Functions and Looping Raise an Exception

Redon Kalemaj
Redon Kalemaj
1,227 Points

I do not understand what i am supposed to do, and what i am doing wrong
def suggest(product_idea):
    if product_idea < "3":
        raise ValueError("Are you sure you don't get it?")
    return product_idea + "inator"

1 Answer

Robin Goyal
Robin Goyal
4,579 Points

You're on the right track! You have to check if the length of the product_idea (string data type) is less than 3 characters. You can use the built in len function to check the length of strings.