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 trialMIkhail Vinogradov
2,669 Pointsstringcases. the last part of the task is not very clear.
hi, i managed to do the first three points. def stringcases (string): tuple = (string.upper(), string.lower(), string.title()) return tuple
However, i dont understand what Reversed needs to do. convert lower case to upper case?
many thanks.
def stringcases (string):
for i in string:
i = i.capitalize()
tuple = (string.upper(), string.lower(), string.capitalize())
return tuple
3 Answers
Steven Parker
231,275 PointsWhat they mean by "Reversed" is to make the string read backwards.
As the hint says, there's no function for that one (but it can be easily done with a slice!).
Sneha Nagpaul
10,124 PointsReversed should simply reverse the string. "Mikhail" -> "liahkiM'
MIkhail Vinogradov
2,669 PointsMany thanks. done now.