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 trialDylan Jackson
Courses Plus Student 1,906 PointsString Cases
I'm getting really perturbed by how these grading scripts are working. I test this in IDLE and the Python shell will run it fine, and return the proper strings.
Sample output from the function:
string = 'giant apple' stringcases(string) ('giant apple', 'GIANT APPLE', 'giant apple', 'Giant Apple', 'elppa tnaig')
def stringcases(string):
orig = string
upper = orig.upper()
lower = orig.lower()
title = orig.title()
reverse = orig[::-1]
data = (orig, upper, lower, title, reverse)
return data
Animesh Bhadra
2,391 Pointsu can just return return upper, lower, title, reverse
in place of creating data.
Dylan Jackson
Courses Plus Student 1,906 PointsDylan Jackson
Courses Plus Student 1,906 PointsNever mind, I did a dumb... I returned the original when it isn't requested.