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 trialadamzemmoura
29,481 PointsWhy isn't this code passing? Maybe a bug with the challenge?
Why isn't this code passing the challenge? It is working when I run it in my terminal having written it in Atom but not passing the challenge. Maybe a bug? Or am I missing something?
def stringcases(word):
reversedString = word[::-1]
return (word.upper(), word.lower(), word.capitalize(), reversedString)
1 Answer
Hai Phan
2,442 PointsThe capitalize method will return a copy of the string with only its first character capitalized, you should use .title() method instead.