Dumb but smart

I just got a letter in the mail saying I qualify for a gifted class but I almost failed half my classes. How tf-