Look at the pictures and mark an O on the picture in which you can do the activity. However, if you cannot do the activity in the picture, mark an X. And then say as follows.

(Is the passage above grammatical? Check the sentences,please. Do we have to use 'an' before "O"? Do we have to use "an" before "X"?)

Yes, it's all grammatically correct, and yes, the use of "an" is correct in both places.