(TMZ) -- For a guy who wasn't big on passing ... Kobe Bryant delivered a HUGE assist to a high school class in Indiana by bailing them out of their final history exam!!

Here's the deal ... Ben Davis H.S. senior, William Pate, got his U.S. Govt. teacher to agree to cancel the final exam if he get could Kobe to publicly acknowledge him on Twitter. 

Sounds impossible, right? Wrong. 

Kobe saw Ben's online plea -- and Tweeted at him saying, "Hope you have an A in this class."

The teacher held up his end of the bargain and gave the entire class a "Get Out of Finals Free" pass. As you can imagine, Pate's become a local hero.