dimanche 6 décembre 2015

Random values in dictionary- python

I have this orderedDict:

(
  [
    ('Joe', ['90', '0']),
    ('Alice', ['100', '0']),
    ('Eva', ['90', '5']),
    ('Clare', ['100', '10']),
    ('Bob', ['100', '5'])
  ]
)

I have to create a function that takes the OrderedDict as an argument, generates a random performance value using normal distribution and returns these in an orderedDict with names as keys.

The result should look like this:

([("Joe",91.362718),("Bob",100.0)}...).

Please help me, I am new to programming with Python.




Aucun commentaire:

Enregistrer un commentaire