james mchugh5,506 Points
I reviewed the video on int() and division, but I'm not understanding how to put it all together
def sillyCase = (string): len(string //2) return string.upper
Steven Parker171,141 Points
Here's a few pointers:
- when defining a function, the "=" symbol is not used. There should be nothing between the function name and the parentheses.
- the integer divide operator is being applied to the string itself instead of the length. It should be outside of the parentheses.
- you'll need an assignment to save the divided length so you can use it in later steps
- you may want to use slices with the computed half length to separate the first and second parts
- Python is very sensitive to indentation. The "return" line should not be any further over than the line above it.
- when calling a function (such as "upper"), the name must be followed by parentheses
- instead of applying "upper" to the whole string, you'll need to apply it to half of the string, and apply "lower" to the other part
- you can join the converted parts back together with concatenation (using the "+" symbol)