import util.Random.shuffle shuffle(1 to 10) foreach println…