The short answer is, no. If you're referring to giving your book and assignment to someone else and receiving back a completed assignment from them which you then submit to your teacher, unchanged and unedited from the way you received it except for the addition of your name to it, and subsequently receive a grade that is added to your personal record, then what you are describing is plagiarism, which is not okay. This would be passing off someone else's work as your own.
One might argue that authors do this when they employ ghostwriters to write for them, so why is that not acceptable for students when it comes to assignments? A basic reason is simply that publishing a book written by a ghostwriter is legally acceptable, while plagiarism is not. But beyond the legalistic framework, there is a rationale that makes sense.
A ghostwriter produces a work which is then publically attributed to someone else. The consumption of this work, however, is based on the product produced, and not the producer. The enjoyment, usefulness, or other qualities of the written work don't depend on who wrote it, but on the quality of the work. While the private contract between the ghostwriter and published author may be seen as deceptive to the general public, it nevertheless does not affect the actual product that is consumed, as the product is consumed after it is already judged to be worthy.
This is different from the product obtained from being a student. When you're a student, you're generally training to become something, to take on a role with more responsibility and more prestige than what you've had before. With increased responsibility and, usually, increased pay, comes the increased possibility that people are depending on you to do a certain job or task, and to do it well.
When you obtain your degree, certificate, or title, and are hired to perform a job, the company, consumers, and other stakeholders use your stated education in order to take a (supposedly) informed gamble on you, that you will be able to competently and skillfully perform the job you are hired for, using the quality of your completed educational work to reflect your future work . However, if someone else completed your assignments for you, then your stated educational background would not be indicative of your future performance, and your employer and other stakeholders would be in jeopardy. Would you be fine with it if the doctor treating your for a heart condition got through medical school by having someone else study for and write her papers in physiology, anatomy, and biochemistry? Or would you find it acceptable for your children to be taught by a teacher who really obtained his credential via a third party who studied and wrote his papers about curriculum development and human psychology? The prohibitions against plagiarism exist for a reason - to protect us all from incompetent professionals and practitioners, because errors on the job are not without consequence. Human health and lives, economies, and organizational well-being can be jeopardized if the people who are endowed with our trust don't actually know what they are doing.
In case you have any suggestion, please do not hesitate to contact us.