Because the average is 7.7, his total points are equal to 7.7*10=77.
Because 7*10<77<8*10, Luke cannot have scored 8 10s. We now seek to prove that he can score 7 tens.
This leaves him with three tests left, that sum to 7 marks. There are clearly many ways to arrange this - for example, 2, 3, and 3 on the first three tests, then ten on all seven other tests. As this shows that 7 10s works and we have proven that 8 10s does not work, 7 is the maximum amount of 10s Luke could have scored.