During a certain period of time, an electrical motor receives 9x10^5 kJ of electrical energy (a form of work) and produces 8x10^5 kJ of mechanical work. Assuming that the internal energy of the motor is remains unchanged, find the amount of heat in kJ that the motor has exchanged (emitted or absorbed) during this period.

I know to use ΔE = q + w, but I don't understand why the answer, ΔE is negative.

the heat is radiated from the motor

like an exothermic reaction has negative energy change but gives off heat