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.
Angel Miranda2,433 Points
its telling me that ValueError isn't raised
product_idea = 3 def suggest(product_idea): if product_idea != 3: raise ValueError("add more letters") return product_idea + "inator" print(format(suggest))
Steven Parker216,810 Points
The instruction say to "
ValueError if the product_idea is less than 3 characters long". There's a few issues here:
- the length of the string should be tested, not the string itself
- the test should check for less than 3 instead of not equal to 3
- you don't need to add any code outside the function
- you don't need to