Random Number Generation
What is random number generation?
- Random number generation is a programming concept that involves a computer generating a random number to be used within a program to add an element of unpredictability
- Examples of where this concept could be used include:
- Simulating the roll of a dice
- Selecting a random question (from a numbered list)
- National lottery
- Cryptography
Concept | Pseudocode | Python |
Random numbers |
|
|
Examples in Python
Random code |
|
National lottery |
|