Skip to content

Coding-Cuddles/99-bottles-of-beer-python-kata

Repository files navigation

"99 Bottles of Beer" kata in Python

CI Replit

Overview

This kata complements Clean Code: Advanced TDD, Ep. 24.

This repository contains an exercise to construct the entire 99 Bottles of Beer song using TDD.

Exercise

Complete the Bottles.song() method that returns the lyrics for the song "99 Bottles of Beer" as an array of strings where each string represents a line of the song:

99 bottles of beer on the wall, 99 bottles of beer.
Take one down and pass it around, 98 bottles of beer on the wall.

98 bottles of beer on the wall, 98 bottles of beer.
Take one down and pass it around, 97 bottles of beer on the wall.

...

3 bottles of beer on the wall, 3 bottles of beer.
Take one down and pass it around, 2 bottles of beer on the wall.

2 bottles of beer on the wall, 2 bottles of beer.
Take one down and pass it around, 1 bottle of beer on the wall.

1 bottle of beer on the wall, 1 bottle of beer.
Take one down and pass it around, no more bottles of beer on the wall.

No more bottles of beer on the wall, no more bottles of beer.
Go to the store and buy some more, 99 bottles of beer on the wall.

Usage

You can import this project into Replit, and it will handle all dependencies automatically.

Prerequisites

Run main

make run

Run tests

make test