You are viewing a single comment's thread. Return to all comments →
Kotlin
fun isWeird(n: Int) : String { val isOdd = n%2 != 0 if (isOdd) { return "Weird" } if (n > 20) { return "Not Weird" } if (n in 2..5) { return "Not Weird" } if (n in 6..20) { return "Weird" } return "Not Weird" }
Seems like cookies are disabled on this browser, please enable them to open this website
Day 3: Intro to Conditional Statements
You are viewing a single comment's thread. Return to all comments →