Kotlinlearncs.online LogoJava
Return to List

Solve: Fizz String

Imported By: Geoffrey Challen
/ Version: 2021.6.0

Given a non-null, non-empty String, if it starts with "f" return "Fizz". If it ends with "b" return "Buzz". If both conditions are true, return "FizzBuzz". In all other cases, return the String unchanged.

fun fizzString(input: String): String {
return "" // You may need to remove this starter code
}

Related Lessons

Stuck? You may find these lessons helpful: