chempatents1981's answer is excellent and should be accepted. That said, I'd like to provide an alternative viewpoint. I am an inventor, not a patent lawyer. As such I don't have a specific financial interest in recommending using a patent lawyer rather than writing your own submission. Patent attorneys first need to get a degree in a technical field. All that I've worked with have followed that up with a advanced degree in science, math or engineering even before going to law school. You aren't going to match that background taking on-line courses. Drafting a patent application is only the first step in obtaining a patent. Nearly all my applications have had office actions and rejections that needed to be dealt with. This is a negotiation. An attorney understands this process and the very specific language necessary to convince an examiner of the worthiness of your patent. I can't imagine doing this on my own, and I have more than 80 patents.
That said, there are steps you can do that will make working with an attorney most efficient and thus less expensive. First you can try to perform your own prior art search. This answer describes my general approach. You are bound to find some patents that are related to your invention. Those can be useful as examples of what your patent may end up like. Next, you'll need to educate the patent attorney on the field of your invention and how your invention is novel and useful. Some of those related patents can provide useful text for the background information. Trying to write all this down in an informal "disclosure" that looks like a patent is a useful exercise that will speed this transfer of knowledge to the attorney. Don't bother trying to write claims, that is really an attorney's task. Remember, when using lawyers, time is literally money.