Wrote 1b, 1c. Some shuffling of variable definitions.
Wrote problem 1d.