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

what wrong with my code?

This is the link of codes: https://w.trhou.se/5k1hh5yvms (the snapshot of code) https://teamtreehouse.com/workspaces/37642412 (link to work space) click nortification.py for the code that i want to ask

i run the code but it says : Traceback (most recent call last):
File "notifications.py", line 4, in <module>
result = praise + "!" + number_of_charaters
TypeError: must be str, not int

I would create as many questions as you need and go from there :)

1 Answer

Number_of_charaters is an integer and must be converted to a string before concatinating. Try this:

Result = praise + “!” + str(number_of_charaters)

it works but it shows this: YOU ARE DOING GREAT!19 not YOU ARE DOING GREAT!!!!!!!!!!!!!!!!!

Hey Mark, see my answer to your second question in the forum. Basically you have a typo :)

I forgot that i create new question :)