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 trial

Python Python Collections (2016, retired 2019) Slices sillyCase

Sillycase.py

I've had a go and tried three different variations yet I keep on getting a bummer!

A little help wouldn't go amiss on this one.

sillycase.py
def sillycase (word):

    midpoint = len(word) // 2

    word1 = word[:midpoint].lower()
    word2 = word[midpoint:].upper()

    return word1 + word2 

1 Answer

Grigorij Schleifer
Grigorij Schleifer
10,365 Points

Hey Sam, your code works fine. Reload the page and paste the code again. I just tried it and it passed the challenge.

You can save some typing by modifying the return statement too :sunglasses:

def sillycase(word):
    midpoint = len(word)//2
    return word[:midpoint].lower() + word[midpoint:].upper()

Hope that helps ...