I had a history teacher in school that liked me even though I barely paid attention in class. I was bored in the class itself, but loved history and would spend the entire period just reading the textbook because I found it interesting. So even though I didn’t pay attention I would still ace assignments like nobody else in there.
I was usually a couple chapters past the class at any given time.