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 trialBrent Capuano
949 Pointsplease 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
def sillycase():
sillycase[0:5] = sillycase.lower
sillycase[5:] = sillycase.upper
1 Answer
Krishna Desai
7,977 PointsHey Brent Capuano,
You're off to a great start! I see four issues with your code.
- Your function does not have accept any arguments.
- 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.
- 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.
- When calling a method, you need to include the parentheses e.g. sillycase.lower()
Hope that helps!
pet
10,908 Pointspet
10,908 PointsHi 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! :)