32 lines
982 B
Kotlin
32 lines
982 B
Kotlin
fun main() {
|
|
val name = "Koshka"
|
|
val favouriteActivities = listOf("jumping on the trees", "eating bananas", "doing jumpscares to other animals", "doing funny sounds")
|
|
|
|
println("Monkey whose name is $name like to $favouriteActivities")
|
|
Thread.sleep(5000)
|
|
|
|
println("Also...")
|
|
Thread.sleep(3000)
|
|
|
|
println("Monkey $name like to sleep. Very much.")
|
|
Thread.sleep(1000)
|
|
|
|
println("Look!")
|
|
for (i in 5 downTo 0) {
|
|
if(i == 0) {
|
|
println("Zzz...")
|
|
break
|
|
}
|
|
println("Monkey $name will fall asleep in $i")
|
|
Thread.sleep(1500)
|
|
}
|
|
println("How do you think how long in hours will monkey $name sleep?")
|
|
|
|
getGuessTheTime(userTime = getTime(), name = name)
|
|
|
|
}
|
|
|
|
fun getTime() : Int? = readLine()?.toInt()
|
|
fun getGuessTheTime(userTime: Int?, name: String?) {
|
|
println("You think monkey $name will sleep $userTime hours,\n but noup, monkey $name will sleep 67 hours\n uhehehehehehehh :DDDDDD ")
|
|
} |