
Rohan Tinna
3,370 PointsSillicase Python Problem
Unable to solve this code challenge.
def sillycase(text):
mid = (len(text) // 2) - 1
new_text[:mid] = text[:mid].tolower()
new_text.join(text[mid:].toupper())
return new_text
1 Answer

Steven Parker
204,860 PointsHere's a few hints:
- you won't need to subtract one for the half
- you cannot assign into a slice
- you will need both a lower-cased part and an upper-cased part
- the "join" operator uses the string on the left as a separator, not one of the components to join
- you can also combine strings with concatenation, which may be easier in this case
rydavim
Treehouse Moderator 18,738 Pointsrydavim
Treehouse Moderator 18,738 PointsSteven Parker has some fantastic hints below, but let us know if you're still feeling stuck. Happy coding!