Into AI

Into AI

Share this post

Into AI
Into AI
Implementing A Pseudorandom Number Generator In Python From Scratch

Implementing A Pseudorandom Number Generator In Python From Scratch

Learn to implement Linear Congruential Generator (LCG), a pseudorandom number generator in Python

Dr. Ashish Bamania's avatar
Dr. Ashish Bamania
May 23, 2024
∙ Paid
2

Share this post

Into AI
Into AI
Implementing A Pseudorandom Number Generator In Python From Scratch
2
Share
Generated with DALL-E 3
Generated with DALL-E 3

Computers use deterministic algorithms to generate Pseudorandom numbers.

These algorithms called Pseudorandom number generators (PRNGs) take a seed value and return a Pseudo-random number.

Let’s talk about one of such popular algorithms.

Note that true randomness is usually generated by Hardware Random Number Generators (HRNGs)/ environmental noise/ quantum processes etc. These are not discussed in this article.

Keep reading with a 7-day free trial

Subscribe to Into AI to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Dr. Ashish Bamania
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share