random elixir code example Example 1: elixir random number Enum.random(0..n) Example 2: generate random number elixir random_number = :rand.uniform(n)