-
-
Save codecademydev/d390d1ec9b89c7835e343cdaf8ca9f96 to your computer and use it in GitHub Desktop.
Codecademy export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun main() { | |
var season = "!" | |
// Write your code below | |
when (season) { | |
"Winter" -> println("Grow kale.") | |
"Spring" -> println("Grow lettuce.") | |
"Summer" -> println("Grow corn.") | |
"Fall" -> println("Grow pumpkins.") | |
else -> println("Not a valid season.") | |
} | |
/* ... | |
My code: | |
*/ | |
var a = "___. Not a valid season." | |
when (season) { | |
"Winter" -> a = "kale." | |
"Spring" -> a = "lettuce." | |
"Summer" -> a = "corn." | |
"Fall" -> a = "pumpkins." | |
} | |
println("[Grow $a]") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment