Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialTrent Fernandez
2,412 PointsI've made a function that creates brand new product names using "artificial intelligence". I have a problem though, pe
def suggest(product_idea):
return product_idea + "inator"
2 Answers
shahar galon
4,471 Pointsfirst of all you need to check if the value is correct by len function for exemple : if len(product_idea) <= 3:
you need to raise an ValueError
3, then should be the return if the value is bigger then 3.
Steven Parker
231,269 PointsYour question got cut off, but some general hints:
- you'll need to add a conditional test ("if") to check the length of the "product_idea"
- based on the test, your code will "raise" the exception specified in the instructions