If you are simply indisposed, you should attend. If so, you must answer at least part of the paper at a satisfactory level to establish your abilities. In any case, as soon as possible after the exam, see a doctor, complete the consideration from, and lodge it immediately. They may arrange for an extension to an assignment, or, if applicable, an exemption from the assessment. An 'exemption' usually means that the final exam mark will be used in place of a test missed through illness, or a similar assignment mark substituted for an assignment unable to be completed for similar reasons.
Documentation is essential.
If there is a long-standing medical problem that causes you to miss out on weeks of work, however, you should seriously consider withdrawing from the course. Discuss this with the lecturer or your program adviser. Further assessment is indicated by a WC or WA code for your result in the course. You will NOT be sent a letter or other advice. You are not entitled to extra study assistance.