I'm programming a learning software. It works with question-/answercards. Now I need an algorithm to randomly pick the cards addicted to a integer-value from 0 - 100 that indicates how often the user has answerd the question right.
My actual idea is to count all integer-values, creating a random integer between 0 and the counted integer-values and use this integer to go through my cards and count their integers until I reached the random integer. Then I reach the integer I choose this card :-)
But there must be a better solution ;-)