For random number creation, you need two commands randi and randomize.
In the example, you will have code make a random number from 1 to 12.
print( randi() % 12 + 1 )
Randi will always generate the same number, but with "randomize" generate become random.
randi() # returns random integer between 0 and 2^32 – 1
randi() % 20 # returns random integer between 0 and 19
Enjoy in randomizing!