Question: A simple random generator is obtained by the formula r_new = (a * rold + b )%m and then setting r old to r new.

A simple random generator is obtained by the formula r_new = (a * rold + b )%m and then setting r old to r new. Write a program that asks the user to enter an initial value for r old . (Such a value is often called a seed). Then print the first 100 random integers generated by this formula, using a = 32310901, b = 1729, and m= 2**24

need the code for python

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!