random function android kotlin code example Example: kotlin Random() val rnds = (0..10).random() // generated random from 1 to 9 included