Skip to content

vittoriomigliore/kata-fizz-buzz

Repository files navigation

FizzBuzz TypeScript Implementation

This project is aimed at learning TypeScript and Test-Driven Development (TDD) by implementing the FizzBuzz kata.
FizzBuzz is a classic programming problem that involves printing numbers from 1 to 100, with specific rules applied for multiples of 3, 5, or both.

Problem Description

Imagine being in a classroom where the teacher introduces a game called FizzBuzz. The rules are simple:

  • Count from 1 to 100.
  • If the number is divisible by 3, say "Fizz" instead.
  • If the number is divisible by 5, say "Buzz" instead.
  • If the number is divisible by both 3 and 5, say "FizzBuzz" instead.

Stage 2 - Additional Requirements

In this stage, new requirements are introduced:

  • A number is considered fizz if it is divisible by 3 or if it contains the digit 3.
  • A number is considered buzz if it is divisible by 5 or if it contains the digit 5.

Sample Output

Here's how the output should look like based on the given rules:

1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz
16
17
Fizz
19
Buzz
... (continues up to 100)

Setup

The only requirements on your computer are:

Then, clone it and install dependencies running the command make install from your terminal, in the root folder of the project.
After dependencies are installed, you can run tests via make test.

Kata Link

For more information about the FizzBuzz kata, visit Coding Dojo - FizzBuzz Kata.

TDD Course

This project is being used as a practice exercise alongside the email course Test-Driven Development 101 by Daniele Scillia.
The course has been instrumental in learning TDD principles and techniques.

Contributing

Contributions are welcome! If you have any suggestions or improvements, please feel free to open an issue or create a pull request.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published