Random

import kotlin.random.Random

println(Random.nextInt(0, 3)) // 0:from 3:until
 ↓
0 ~ 2