Michael Morale2,701 Points
I understand what it's asking, but I don't really know how to put it down. I know to use the (//2) to divide the word as well as the .upper and .lower but that's all I got. I know the int( function but not sure how it applies here. Any pointers?
def sillycase(word): (//2 word.upper) + (//2 word.lower)
Seth Gorham1,629 Points
Hi Michael, I was able to get this to work by using the len() function and slices.
word = "Revolution" # Can't divide a string by an integer, so we get half the length halfway = len(word) // 2 # Then use the halfway as an index in a slice, adding the upper or lower functions to the end word[0:halfway].lower() word[halfway:].upper()
A lot of this was trial and error running individual commands in the workspace.
Hope this helps and good luck!