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
charles Bronson
2,988 PointsChallenge Task 1 of 1 python Whats wrong with this?
def suggest(x): if x < len("yes"): raise ValueError("more than 3 letters please") return product_idea + "inator"
try: product_idea = input("what is the product_idea ") x = len(product_idea) amount_due =suggest(x) except ValueError as err: print(" not a proper name ") print("{}".format(err)) else: print ("the project name is {} ".format(amount_due))
1 Answer
Steven Parker
243,266 PointsYou only need to add a test ("if") and a "raise" to the original function. You won't need any "try", "except" or to "print" or "input" anything.
Also be sure to use the argument passed in, don't add any fixed literal strings.