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

Python

Ivana Bojcic
seal-mask
.a{fill-rule:evenodd;}techdegree
Ivana Bojcic
Python Development Techdegree Student 892 Points

Suggestinator help

I am losing my mind.

def suggest(product_idea):
    len(product_idea) > 3
    product_idea = input("Insert product idea")
    return product_idea + "inator"
print("all good")

try:
    product_idea = input("Insert product idea")
    len(product_idea) <= 3
    print(product_idea + "inator")
except:
    len(product_idea) <= 3
    raise ValueError("too short")

2 Answers

Steven Parker
Steven Parker
231,198 Points

You didn't provide a link to the course page; but if I remember this challenge correctly, you may be getting way too fancy.

If this is the challenge I'm thinking of:

  • you won't need to print anything
  • you don't need to input anything
  • you don't need to raise or catch exceptions

Re-read the instructions and see if I'm right. If not, please post a link to the course page and I'll take another look.

Steven Parker
Steven Parker
231,198 Points

Yes, that's the one I remember, except I forgot that the point was raising an exception. I edited that hint, and all the others are correct. Bonus hint: a solution can be constructed by adding only 2 lines of code.

For future questions, you might want to take a look at this video about Posting a Question. If entered as suggested, your question will automatically be associated with the exercise and get a link button.