You have written a snippet of code to display the results of the roll of a six-sided die. When the die displays from 3 to 6 inclusive, you want to display a special message. Using a Kotlin range, what code should you add?kotlinwhen (die) { 1 -> println('die is 1') 2 -> println('die is 2') ___ -> printlin('die is between 3 and 6') else -> printlin('dies is unknown')}

🎲 Try a Random Question  |  Total Questions in Quiz: 83  |  🧠 Study this quiz with Flashcards
This question is part of a full practice quiz:
Kotlin Quiz — practice the complete quiz, review flashcards, or try a random question.

Kotlin MCQs For LinkedIn Skill Assessments.


You have written a snippet of code to display the results of the roll of a six-sided die. When the die displays from 3 to 6 inclusive, you want to display a special message. Using a Kotlin range, what code should you add?<br>kotlin<br>when (die) {<br> 1 -> println('die is 1')<br> 2 -> println('die is 2')<br> ___ -> printlin('die is between 3 and 6')<br> else -> printlin('dies is unknown')<br>}<br>