M
M
Maybe Somebody2018-01-09 20:09:01
Python
Maybe Somebody, 2018-01-09 20:09:01

Random event python?

How can you make a function so that, for example, 1 is returned with a 1% chance, 2 is returned with a 99% chance, and so on. It is advisable to do the setting through a dictionary like . ps It is possible through not office. libraries, but better without them. {0.01: 1, 0.99: 2}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Petya Persianov, 2018-01-09
@maybesomebody

Here is the link
https://stackoverflow.com/questions/4265988/genera...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question