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 trialBrian Minkin
Courses Plus Student 795 PointsError message: upper and lower cases??!!
I have checked this independently and it worked fine for all the cases.
def stringcases(words):
words_tup = words.lower(), words.upper(), words.title(),words[::-1]
return words_tup
stringcases('buGGy TrEeHouse COMPILER!!')
1 Answer
Alexander Davison
65,469 PointsThe code challenge isn't buggy. It's just very picky. Note that you have the lower()
-ed version of the string before the upper()
-ed version of the string. Try it with the uppercase version first, then the lowercase version.
Transform this line:
words_tup = words.lower(), words.upper(), words.title(),words[::-1]
Into this:
words_tup = words.upper(), words.lower(), words.title(), words[::-1]
And you should be good to go
Brian Minkin
Courses Plus Student 795 PointsBrian Minkin
Courses Plus Student 795 Pointsoh yea, I got it going thanks for pointing that out!
Alexander Davison
65,469 PointsAlexander Davison
65,469 PointsNo problem! :)
Remember to provide a Best Answer if this answer helped you!