Convert lowercase into uppercase until lower = N / 2
if ( S [ i ] . islower ( ) ) : NEW_LINE INDENT S [ i ] = chr ( ord ( S [ i ] ) - 32 ) NEW_LINE moves += 1 NEW_LINE upper += 1 NEW_LINE lower -= 1 NEW_LINE DEDENT