Suppose there are $n$ questions on the test. Each can be answered correctly for 1 point or incorrectly for 0 point. Student $i$ has probability $\pi_i$ of answering each question correctly. (This can be generalized for asymmetric test questions.)
The expected number of correct answers is $n\pi_i$.