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 trial
Siva Somepalli
275 PointsIs something wrong with my "Code !" :(
def suggest(product_idea):
if len(product_idea) < 3:
raise ValueError("Please suggest with minimum 3 characters")
return product_idea + "inator"
[MOD: added ```python formatting -cf]
2 Answers
Chris Freeman
Treehouse Moderator 68,468 PointsThe indentation of the if statement and the return statement is insufficient. They both should be inside the def statement. Remember to keep the raise statement inside the if block as it is indented.
Post back if you need more help. Good Luck!!
KRIS NIKOLAISEN
54,974 PointsProvided your indentation is correct then our code appears to be correct. Did it not pass the challenge?
Siva Somepalli
275 PointsAfter reading your hint, which is provided above, I just used the tab key and It make my code correct! Yes! I passed the test.
Thank you Kris :)
Siva Somepalli
275 PointsSiva Somepalli
275 PointsThank you Chris! I understand indentation is most Important when we write code or when we create method.
print("Test completed !")
Thank you for supporting me.