7 kyu

99 Bottles of Beer

2,972 of 3,739ankr

Description:

Instructions

Complete the function that returns the lyrics for the song 99 Bottles of Beer as an array of strings: each line should be a separate element - see the example at the bottom.

Note: in order to avoid hardcoded solutions, the size of your code is limited to 1000 characters

Lyrics

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.

...and so on...

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.

Example

[ "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.",

  ...and so on...

  "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." ]
Strings
Algorithms

Similar Kata:

Stats:

CreatedDec 10, 2013
PublishedDec 10, 2013
Warriors Trained8757
Total Skips693
Total Code Submissions33174
Total Times Completed3739
JavaScript Completions2972
Python Completions731
Ruby Completions55
OCaml Completions10
Total Stars104
% of votes with a positive feedback rating76% of 399
Total "Very Satisfied" Votes262
Total "Somewhat Satisfied" Votes83
Total "Not Satisfied" Votes54
Ad
Contributors
  • ankr Avatar
  • anter69 Avatar
  • Chrono79 Avatar
  • Blind4Basics Avatar
  • FArekkusu Avatar
  • monadius Avatar
  • albertogcmr Avatar
  • ejini战神 Avatar
  • Glinator Avatar
Ad