Search code examples
pythonrandomdice

How to predict the next value of random function ? In a dice problem


Import random

A= random.randint(1,6)
Print(A)
  1. I have tried writing this code
  2. I want to predict the next value of random function

Solution

  • In software, we generate random numbers by calling a function called a “random number generator”. Such functions have hidden states, so that repeated calls to the function generate new numbers that appear random. If you know this state, you can predict all future outcomes of the random number generators. O’Neill, a professor at Harvey Mudd college, advocates against using random number generators that make such predictions trivially easy.