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 trialAlwen Nyikadzanzwa
1,541 Pointswhat is wrong with my code here
def suggest(product_idea):
return product_idea + "inator"
product_idea = input("Enter a product name")
if len(product_idea) < 3:
raise ValueError("Sorry your idea is too short")
1 Answer
Oszkár Fehér
Treehouse Project ReviewerHi Alwen Nyikadzanzwa. You are on the right track and your code can pass the quiz just with a little adjustments First of all, you don't need this line
product_idea = input("Enter a product name")
The product_idea
it's given as a parameter
What you need to do is to move you raise
block inside of the function, in your code, it's outside of the function
def suggest(product_idea):
<here comes your raise block> --> also make sure there is no extra `tab` or any extra space when I checked your code I ran into some extra `tabs`
return product_idea + "inator"
I hope this will help you out. Happy codding.