Menu
Coddy logo textTech

Game Overview

Part of the Fundamentals section of Coddy's Kotlin journey. Lesson 63 of 93.

challenge icon

Challenge

Medium

In this chapter, you'll build a customizable FizzBuzz game step by step.

To start, implement the traditional FizzBuzz for numbers 1 to 15 using the standard divisors 3 and 5.

For each number from 1 to 15:

  • Print FizzBuzz if the number is divisible by both 3 and 5
  • Print Fizz if the number is divisible by 3 only
  • Print Buzz if the number is divisible by 5 only
  • Print the number itself otherwise

Each output should be on its own line.

Try it yourself

fun main() {
    // TODO: Write your code below
    // Implement FizzBuzz for numbers 1 to 15
    // - Print "FizzBuzz" if divisible by both 3 and 5
    // - Print "Fizz" if divisible by 3 only
    // - Print "Buzz" if divisible by 5 only
    // - Print the number itself otherwise
    
}

All lessons in Fundamentals

Practice on your own: Kotlin playground