title: generating random numbers in python with percentage function on what selected value in python
body: <p>Lets say I wanted to generate a random number in python using something like <code>random.randint(1,100)</code> but how would I go about making Python want to tend toward selecting higher random numbers? So like if i wanted 80% of numbers above 50 to be chosen with 20% of numbers below 50 to be chosen. like a casino slot machine probability. (we all know there not truly random but are set with probability). </p>
  
  <p>I have tried </p>
  
  <pre><code>import random
  
  random.randint(1,100)
  select % above 50
  </code></pre>