Your task is to fill the blanks in the given Kotlin code. The goal of the code is to check if a number falls within a certain range and then output a message based on that checking. Your job is to define the range of numbers and use the correct relational operator to perform the check. Remember, the range can be any sequence of numbers you want, and the relational operator should correctly assess whether a number falls within that range.
Ranges
Implementing a number range check in code
Report a typo
Fill in the gaps with the relevant elements
fun main() {
val =
val number = 3
val output = if (number range) "$number is in the range." else "$number is not in the range."
println(output)
} ___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.