Created
July 24, 2013 07:05
-
-
Save icyflame/6068586 to your computer and use it in GitHub Desktop.
Code for the solution of the fourth problem
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def pseudoRandomGen(): | |
X = 42 | |
a = 25 | |
c = 31 | |
m = 2 ** 20 | |
for i in range(1,2001): | |
X = (a * X + c) % m | |
return X | |
print 'The 200th number is:', pseudoRandomGen() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment