lundi 21 décembre 2015

Generate random integers from 1 to 100 distributed as some function

I am trying to study for my final in a Python class, and I'm stumped on one of the questions.

I am supposed to write a program that generates random integers from 1 to 100 such that they are "distributed as a sine function," as in the histogram of results will follow a sine curve. Any help that could point me in the right direction would be greatly appreciated.

Link to question




Aucun commentaire:

Enregistrer un commentaire