dimanche 16 décembre 2018

Use Random.random [30,35] to print random numbers between 30,35. Seed(70)

Probably a simple answer not sure what I am missing. For a homework assignment I have to use random.random() to generate numbers between 30 and 35. The seed has to be set to 70 to match the pseudo-random numbers with the grader. This wasnt in my lecture so I am a little stumped as to what to do.

I have

import random

def problem2_4(): print(random.random(30,35))

But this is clearly wrong.

The assignment says the output should look like (note: for the problem i use def problem2_4() just for the assignment grading system)

problem2_4() [34.54884618961936, 31.470395203793395, 32.297169396656095, 30.681793552717807, 34.97530360173135, 30.773219981037737, 33.36969776732032, 32.990127772708405, 33.57311858494461, 32.052629620057274]




Aucun commentaire:

Enregistrer un commentaire