Assign to the integer x a random number between 0 and 17 (inclusive), from a crypto secure random number generator.
use Math::Random::Secure qw(irand);
my $x = irand(17);
use Math::Random::Secure qw(rand);
my $x = int(rand(17));
import "crypto/rand" import "math/big"
bi, err := rand.Int(rand.Reader, big.NewInt(18)) x := int(bi.Int64())
$x = random_int(0, 17)
import secrets
x = secrets.choice(range(0, 18))
x = secrets.randbelow(18)
require 'securerandom'
x = SecureRandom.rand(0..17)
use rand::prelude::*;
let mut rng = rand::thread_rng(); let x = rng.gen_range(0..18);
No security, no password. Other people might choose the same nickname.