Toss a coin "ntoss" times and count heads

ntoss = 10;
nheads = 0;
Do [
If[Random[] < 0.5, 
          nheads = nheads + 1], 
{n, 1, 
          ntoss}
];
Print["Probability(heads) = ", nheads/ntoss // N]