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

Valeshan Naidoo
Valeshan Naidoo
27,008 Points

sillyCASE, my code works on the console

I don't know where I've gone wrong with my code, I know there are solutions around, but I can't see how mine won't work. I've switched things around even though I know it won't make a difference, but it still doesn't go through. I get the "bummer" error. I appreciate any help

sillycase.py
 def sillycase(string):
        first_string = string[:len(string)//2].lower()
        second_string= string[len(string)//2:].upper()
        return (first_string+second_string)

2 Answers

Valeshan Naidoo
Valeshan Naidoo
27,008 Points

well that's embarrassing, thanks for the quick response!