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 trialvictor E
19,146 Pointsnot sure why this code is not working, seems correct to me
i keep getting; Bummer: Got the wrong string for:
def stringcases(single):
return (single.upper(), single.lower(), single.capitalize(), single[::-1])
1 Answer
Michael Hulet
47,913 PointsThis code is nearly right. Take a closer look at the 3rd bullet point in the list. You should capitalize the first letter in every word in the string, so it should look something like this:
"This Is A Test"
However, the capitalize
function only capitalizes the first letter in the whole string, like this:
"This is a test"
You're probably looking for the title
function instead of capitalize
victor E
19,146 Pointsvictor E
19,146 Pointsthank you!