title: generation of random numbers
body: <p>I would like to randomly generate 10 numbers (0 or 1), it means that the result will look like (for example) 0 0 1 0 1 1 1 0 1 0; 
   My question is how to resolve the following situation:</p>
  
  <ul>
  <li><p>I want that the percentage of having 1 is 70% which means that I will have 7 times the number 1 and 3 times the number 0</p>
  
  <p>For example:
  we suppose that 0 is for false response and 1 is for a true one, if I have 100 responses, the percentage of having true responses is X % and the percentage of having false responses is Y %, so I want generate such a numbers, according to the percentage that I want, some time I need that the trues responses should be = 80% and the false one= 20% for example, and other time I need that false responses=40% and true responses=60%....</p></li>
  </ul>