Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Python Collections (2016, retired 2019) Tuples Stringcases

Oszkár Fehér
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Oszkár Fehér
Treehouse Project Reviewer

Somebody can explain pliz what the quiz is waiting for return

i understood the quiz like this, now what is wrong?

stringcases.py
def stringcases(args):
    All_upper = args.upper()
    All_lower = args.lower()
    x = args.split()
    cap = []
    rev = []
    rev2 = []
    for a in x:
        cap.append(a.capitalize())
        rev.append(a)
    Titlecased = ' '.join(cap)
    for letter in args:
        rev.append(letter)
    rev2 = rev[-1::-1]
    Reversed = ''.join(rev2)

    return All_upper, All_lower, Titlecased, Reversed

1 Answer

Kenneth Love
STAFF
Kenneth Love
Treehouse Guest Teacher

Did you test it out in Workspaces or your own Python shell? You have all of the code right there, put it into a shell and feed it a string. Does the output look right?

Oszkár Fehér
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Oszkár Fehér
Treehouse Project Reviewer

i made it in Pycharm before i put in the quiz and it was working perfectly,actualy a made it many times to be sure that its working, but this code it's not working, probably i skipt something i slept just 3 hours and i am at work now, thats why i did observ the problem and even now i can't see the mistake, but you are right, i tested and its not working. soukran

Kenneth Love
Kenneth Love
Treehouse Guest Teacher

It's definitely not working perfectly. Your reverse code, for example, doesn't produce the right output.