Exams can be retaken. If you fail because you are dumb there's not much you can do but if you fail because you were building something cool then that's fixable.
Is this sarcasm? I suppose if you fail and have to retake the class, then you can "retake" the exam, but that closes a lot of doors when trying to get in to a good college. And most likely if you're "not dumb", you'll end up with a C on the exam and pass the class with a low grade, rather than outright failing it. In which case you would not be able to retake the exam.