Welcome to the Treehouse Community
Looking to learn something new?
Abdullah Jassim4,551 Points
Why is this logic wrong?
def sillycase(string): half = int(len(string)//2) lower_cap = string[:half].lower() upper_cap = lower_cap[half:].upper() cap = upper_cap return cap result = sillycase("treehouse") print(result)
Steven Parker222,348 Points
You've got the right idea, but there's a few issues:
- you need to use the original string to make both parts
- you'll need to return the result of joining both parts together
- "You'll want to use the int() function or integer division, //" — but you don't need both
- you won't need to call the function, only define it
- you won't need to print anything