James earns $20 an hour while working at his main job.  He earns 20% less while working his second job.  He works 30 hours at his main job and half that much at his second job.  How much does he earn per week?
James earns 20*.2=$
<gadget id="calculator">20*.2</gadget>
<output>4</output>
4 less while working his second job.
So he earns 20-4=$
<gadget id="calculator">20-4</gadget>
<output>16</output>
16 an hour.
At his first job he earns 20*30=$
<gadget id="calculator">20*30</gadget>
<output>600</output>
600.
He works 30/2=
<gadget id="calculator">30/2</gadget>
<output>15</output>
15 hours at his second job.
So he earns 15*16=$
<gadget id="calculator">15*16</gadget>
<output>240</output>
240.
So he earns 600+240=$
<gadget id="calculator">600+240</gadget>
<output>840</output>
840 a week.

<result>840</result>