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

Can't get this bit of code to work. Can someone look at it and see what's wrong?

def suggest(product_idea): if len(product_idea) < 3: raise ValueError("Please try again!") result (product_idea + "inator") print ("Your machine is called {}!")

prodcut_idea = input("What is it called?")

Yes return instead of print. And the checker will pass in a value to your function as product_idea so there is no need for input.

3 Answers

Mia Allen
Mia Allen
2,929 Points

I think it's your spelling. You spelled product as Prodcut for the input. Hope that helps!

I fixed that and still nothing. Any advice?

Mia Allen
Mia Allen
2,929 Points

It's always good to check your indentation. Did it tell you what kind of error it was?

It will run the program. Ask for the input, then nothing. No errors.

Are you trying to pass the challenge? If so you shouldn't have any input or print statements. But you should have a return statement.

Okay. Return instead of print? And no inputs?