Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Generate a random integer using the random.org service
ResourceFunction["RandomDotOrgInteger"][{imin,imax}] gives a random integer in the range {imin,imax} using the random.org service. | |
ResourceFunction["RandomDotOrgInteger"][imax] gives a random integer in the range {0,…,imax}. | |
ResourceFunction["RandomDotOrgInteger"][] randomly gives 0 or 1. | |
ResourceFunction["RandomDotOrgInteger"][range,n] gives a list of n random integers. | |
ResourceFunction["RandomDotOrgInteger"][range,{n1,n2,…}] gives an n1×n2×… array of random integers. |
A random integer in the range 1 through 10:
In[1]:= | ![]() |
Out[1]= | ![]() |
A random integer in the range 0 through 3:
In[2]:= | ![]() |
Out[2]= | ![]() |
A random choice of 0 or 1:
In[3]:= | ![]() |
Out[3]= | ![]() |
Twenty random integers in the range 0 through 5:
In[4]:= | ![]() |
Out[4]= | ![]() |
A 3×4 random array of 0s and 1s:
In[5]:= | ![]() |
Out[5]= | ![]() |
A cellular automaton with random initial conditions:
In[6]:= | ![]() |
Out[6]= | ![]() |
Random circles at integer positions:
In[7]:= | ![]() |
Out[7]= | ![]() |
Random array of black and white cells:
In[8]:= | ![]() |
Out[8]= | ![]() |
Count how many pairs of random integers between 1 and a million are relatively prime:
In[9]:= | ![]() |
Out[9]= | ![]() |
Integers outside the range {-109,109} cannot be generated:
In[10]:= | ![]() |
Out[10]= | ![]() |
A randomly filled cubic lattice:
In[11]:= | ![]() |
Out[11]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License