An open API service indexing awesome lists of open source software.

https://github.com/clearcodehq/fizzbuzz-tdd

Fizzbuzz with TDD example to prelection on smcebi
https://github.com/clearcodehq/fizzbuzz-tdd

Last synced: about 1 year ago
JSON representation

Fizzbuzz with TDD example to prelection on smcebi

Awesome Lists containing this project

README

          

# fizzbuzz-tdd
[![Build Status](https://travis-ci.org/ClearcodeHQ/fizzbuzz-tdd.svg?branch=master)](https://travis-ci.org/ClearcodeHQ/fizzbuzz-tdd)
Fizzbuzz with TDD example to prelection on smcebi

## Requirements

```
pip install -r requirements.txt
```

## Example of output

```
>>> print fizzbuzz(8)
1
2
fizz
4
buzz
fizz
8
```

## Rules

1. Function fizzbuzz return string splitted by new line char
2. On every line if line number not is divisible by three or five then write line number
3. If number of line is divisible by three then then write 'fizz'
4. If number of line is divisible by fize then write 'buzz'
5. If number of line is divisible by three and fize then write 'fizzbuzz'
6. 'fizz' and 'buzz' words must be changed as additional parameters