Kotlinlearncs.online LogoJava
Return to List

Solve: Deadly Animal Ranking

Created By: Geoffrey Challen
/ Version: 2026.2.0

Australia is famous for its dangerous wildlife! Create a function called dangerRating that accepts a String with the name of an Australian animal and returns a String describing how dangerous it is.

Use the following ratings:

  • "box jellyfish" -> "Deadly"
  • "inland taipan" -> "Deadly"
  • "blue-ringed octopus" -> "Deadly"
  • "saltwater crocodile" -> "Very dangerous"
  • "funnel-web spider" -> "Very dangerous"
  • "kangaroo" -> "Caution"
  • "emu" -> "Caution"
  • "platypus" -> "Surprisingly venomous"
  • "koala" -> "Mostly harmless"
  • For any other animal, return "Unknown"

Related Lessons

Stuck? You may find these lessons helpful:

Report a Problem

Attribution must link to this page: https://www.learncs.online/solve/kotlin/deadly-animal-ranking/[email protected]