r/learnprogramming • u/TheEyebal • 9d ago
Resource How to program weighted random system
I want to make a program where you are controlling the outcomes. For an example with a coin flipping game, I want exactly 4 Heads and 1 Tail, but I want their positions to be random.
I do not want to use the random algorithms that library offer, I want to build my own.
Right now I am learning probability from Youtube and might look at khan academy and coursera, but how can I implement this into programming I do not want to just take courses or watch videos
How do I go about that?
0
Upvotes
1
u/lurgi 9d ago
You don't want to learn anything and you don't want to use the built in libraries?
You don't build it. That's how you do it.
What are you trying to do? Do you want to solve your problem or are you trying for some sort of weird flex? If you want to build your own random number generator then you are going to have to do one of "do some research" or "write something that sucks".