Hello! :)
This is the code I wrote 2 years ago for my programming lecture.
Here, we are computing the days it takes for prisoner to reach the freedom. There are 5 doors with different probabilities for selecting. Each door has a different end. Some takes the prisoner to freedom, some takes the prisoner to a tunnel which ends with going back to the cell.
Thank you for reading this :)