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

No idea what to do here.

I know the upper and lower functions, but other than that I have no idea how to proceed.

Appreciate any answers with explanations.

sillycase.py
def sillycase
.upper() .lower() 

1 Answer

Steven Parker
Steven Parker
231,275 Points

You have the right idea about using the methods for case conversion, but they need to be attached to the name of a string variable to work. Here's a few general hints about constructing the function:

  • when defining a function, the function name should be followed by parentheses
  • if the function takes argument(s), their names should be inside those parentheses
  • the "len" function might be useful for determining how many characters should be in each half
  • you can use a slice to get the separate halves of the string
  • you might create some temporary variables to hold parts of the string while working with them
  • you can join string parts back together using concatenation (+)

Hope that helps, and remember you can always go back and review any videos if you need a refresher.