dimanche 3 janvier 2021

How to add a number outside of the range that could be randomly selected

sides=random.randrange(3,10)

I'd like to add 360 to the numbers that could be randomly selected.

I want a random number from the following numbers:

[3, 4, 5, 6, 7, 8, 9, 10, 360]

I know how to get a random number from 3 to 10, but I don't know how to make 360 a possible choice too.




Aucun commentaire:

Enregistrer un commentaire