It is for some schools (HS and/or college). It also counts as a foreign language for some schools, for example the GA publics (both HSs and colleges.)
Far preferable to take these classes. Can you take them in Grade 10?
Take the class. At some schools, including the one where I read apps, you would not get any consideration for the course and its rigor if you just take the exam. Even if you get a 5 on the AP test. (yes, there can be exceptions to this, e.g. the HS doesn’t offer the course, or scheduling difficulties, as reported by the HS counselor, prevented a student from taking the course.)
Further, at some schools, if you don’t have courses supporting your major selection, it will make it tougher to be admitted. Do you/will you have ECs that support CS as a major?