Complete the code to print "Weekend" when day is Saturday or Sunday.
val day = "Saturday" when(day) { [1] -> println("Weekend") else -> println("Weekday") }
Complete the code to print "Vowel" when letter is 'a', 'e', 'i', 'o', or 'u'.
val letter = 'e' when(letter) { [1] -> println("Vowel") else -> println("Consonant") }
Fix the error in the when expression to match multiple numbers for "Small number".
val num = 3 when(num) { [1] -> println("Small number") else -> println("Other number") }
Fill both blanks to print "Weekend" for Saturday or Sunday and "Weekday" otherwise.
val day = "Sunday" when(day) { [1] -> println("Weekend") [2] -> println("Weekday") }
Fill all three blanks to print "Vowel", "Digit", or "Other" based on the input character.
val ch = '7' when(ch) { [1] -> println("Vowel") [2] -> println("Digit") [3] -> println("Other") }
