Wikipages: http://sagemath.wikispaces.com/histograms (Scroll down here to see histogram.)
Problem: Suppose p of a population has a characteristic A where 0≤p≤ 1. How can we generate and manipulate a sample set for this characteristic?
Create a function random_between(j,k) that returns a (pseudo) random integer between the integers j and k.
Create a function binomial_trial(p) that returns 1 (success=has characteristic A) or 0 (failure=does not have characteristic A).
Create a function count_if(list1,p) that returns the number of elements of list1 that have value ≤ p*100.