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) Slices sillyCase

Brent Capuano
Brent Capuano
949 Points

please help. im not sure how to do this

Listen. This is my second post on this. I dont know how to do this. Im tired of this challenge. I dont know how to do this. I wish I had an example to go by but this program teaches you something then expects you to know "advanced" stuff like adding in integers. Well guess what? I dont get it. And people hang the carrot in your face and expect you to just figure it out. Well Im not sure i ever learned this INT upper case splicing anywhere. How about a freaking hints section so i dont have to wait for an entire day to get help on something. as you can see im super frustrated and im getting annoyed

sillycase.py
def sillycase():
    sillycase[0:5] = sillycase.lower
    sillycase[5:] = sillycase.upper
pet
pet
10,908 Points

Hi Brent Capuano! If you take the Python Basics Course that will explain how to add integers and other stuff like that.

Best, and Hope this Helps! :)

1 Answer

Krishna Desai
Krishna Desai
7,977 Points

Hey Brent Capuano,

You're off to a great start! I see four issues with your code.

  1. Your function does not have accept any arguments.
  2. You've arbitrarily chosen 5 to be the "middle" of the string. In reality, you wouldn't know where the middle actually would fall. That's why the exercise suggests that you use integer division or round to determine the middle. Hint: The middle would be half the total length.
  3. Strings are immutable. This means that they can't be changed and therefore you can't assign anything to them. You can however concatenate two strings and return that result.
  4. When calling a method, you need to include the parentheses e.g. sillycase.lower()

Hope that helps!