Can I retake the quiz if I fail?

Yes, you have unlimited attempts for courses you've purchased as well as free courses. If you haven't purchased the course yet, you will need to buy it first to have access to unlimited test attempts.