How would you write a program to move inside a square spiral? Start at the upper left corner of the square and walk its edges clockwise. Just before re-approaching the upper left corner, spiral into the square instead, ultimately arriving at the center of the square.
def print_spiral(matrix): print_spiral_help(matrix, 0, 0, 0, len(matrix) - 1, len(matrix) - 1) def print_spiral_help(matrix, dir, top, left, right, bot): if left > right or top > bot: return # top if dir == 0: for i in range(left, right + 1): print matrix[top][i], print_spiral_help(matrix, 1, top + 1, left, right, bot) # Right elif dir == 1: for i in range(top, bot + 1): print matrix[i][right], print_spiral_help(matrix, 3, top, left, right - 1, bot) # Left elif dir == 2: for i in range(bot, top - 1, -1): print matrix[i][left], print_spiral_help(matrix, 0, top, left + 1, right, bot) # Bottom elif dir == 3: for i in range(right, left - 1, -1): print matrix[bot][i], print_spiral_help(matrix, 2, top, left, right, bot - 1)
Sit the staff down individually and ask if they are experiencing any hang ups that are preventing them from meeting their goals. If the staff is just incompetent, I would figure out what training they need to start meeting performance expectations
Income Statement: Because depreciation is an expense, Operating income (EBIT) decreases by $10. Net income also declines by EBIT*(1-tax rate). Assuming a 35% tax rate, NI decreases by $6.50. Balance Sheet: Cumulative depreciation increase $10, so PP&E (Plant Property and Equipment) decreases by $10). The reduction in net income also causes a Reduction in Retained Earnings by $6.50. Cashflow Statement: Net income decreased by $6.50 and D&A increased $10, cashflow from operations increases by $3.50.