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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Alec Schneider](https://secure.gravatar.com/avatar/77cf518bdb5f535cbf58b0684ab30945?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Alec Schneider
1,673 PointsFunction naming incorrect on Python Collections sillycase challenge making the code checker unable to find my method.
I think the code checker has some other method name it is looking for instead of the 'sillycase' function name requested in the problem description. This is resulting in an error "Couldn't find 'sillycase'." being thrown.
def sillycase(string):
split_loc = int(len(string))
return lower(string[:split_loc]) + upper(string[split_loc:])
2 Answers
![KRIS NIKOLAISEN](https://secure.gravatar.com/avatar/65d74a723997b41a80d2d909c6e06960?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
KRIS NIKOLAISEN
54,969 PointsIf you run your code in a workspace you'll receive a better error message.
NameError: name 'lower' is not defined
This is why the function can't be found. According to the python docs use str.lower() to convert to lowercase - meaning (string[:split_loc]).lower(). The same error will occur with upper.
You also need to work with halves of the string so split_loc should include divide by 2.
![Robin Goyal](https://secure.gravatar.com/avatar/c9638724785942dc66c016ece0494885?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Robin Goyal
4,582 PointsSo there are no built-in functions in Python that are called upper and lower. These are methods that are tied to the Python str object. You have to do str.upper or str.lower.
>>> string = "Hello"
>>> string.upper()
"HELLO"
>>> string.lower()
"hello"