Attachment for homework is below