p1 = 15436 p2 = 65 n = 22 seed = 56 list1 = [] def squares(N): seed = 56 x0 = seed for i in range(N): xi = (p1*x0 + p2)%(2**N) x0 = xi yield xi for n in squares(1000): print(n)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)