Completed Exercise 13.5. Create a function called 'choose_from_hist', that takes a histogram and returns a random chosen with probability in proportion to frequency.