Well, you could always say that the tests were harder than usual... Or maybe that you froze up... Or maybe that you crashed when studying... But, you could just say the truth in that you just didn't do as good because of a friend. (What? Computers can be friends in a weird... misanthropic sort of way)
Or say that you were distracted by someone of the fairer sex ^__^ (that's a fun one to use if you've got parents like mine

)