It is your duty to pray every day. Something that is a moral obligation.
Your work is how you earn your living. The means by which you produce something.
My job is looking after the dogs. A piece of work; by extension your post of empoyment.
My function in the company has yet to be decided. The purpose for which something exists, a role.
What task have you been set by the teacher? A definite piece of work (like writing an essay).
Student or Learner