You have unlimited attempts to write the exam, unless you are suspected of cheating. If you are found to have cheated in your exam then you will be removed from the course and will need to re-enrol and pay for a new course.