Bit String Probability Question

I'm not quite sure how to approach the second part of this problem. Any help is appreciated. Thanks.

You wrote a computer program.

The input to your program is any 400-bit string. You want to make sure that your program is good, that is, that it does not crash on any input.

1.How many possible inputs are there to your program?

Ans: I think the possible outputs is 2^400

You use the following randomized algorithm to test your program:

(a) Choose a 400-bit string r uniformly at random (i.e., each possible string is equally likely to be chosen).
(b) Run your program on input r.
• Yes, since each bit string is equally likely. This is the same as $\frac{\mbox{Num bad cases}}{\mbox{Total num cases}}$. It is also something that can be obtained from a "Binomial random variable" if you know what that is, since $$\frac{400 \choose 42}{2^{400}} = {400 \choose 42} (1/2)^{42} (1/2)^{400-42}$$ – Michael Mar 2 '17 at 5:52