Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Am I even close?
I feel like this accurately shows my current understanding of where I am. Im not sure where I went wrong.
try: def suggest(product_idea): return product_idea + "inator" except ValueError: if product_idea < 3: raise ValueError
The challenge is expecting a
ValueError to be raised, and not caught by a try-except block. If you did need a try-except block, the
except ValueError: should be at the same indentation level, such as
try: pass except ValueError: pass
Once you return from a function, the rest of the function gets ignored. Try moving the
if block so that it is before the
if statement compares the variable
product_idea, which is a string, to the number
3. To instead use the length of the string, try using the