tutorial |
---|
Have you ever heard the song about 99 bottles of milk? Is a great song, is not boring at all...
Here you can listen to the song: https://www.youtube.com/watch?v=Xy-da43E6Lo
-
Please declare a function named
number_of_bottles()
. -
The function needs to print (use the
print
statement and notreturn
) the exact same lyrics in the song.
The result should be something like this:
99 bottles of milk on the wall, 99 bottles of milk.
Take one down and pass it around, 98 bottles of milk on the wall.
98 bottles of milk on the wall, 98 bottles of milk.
Take one down and pass it around, 97 bottles of milk on the wall.
...
...
2 bottles of milk on the wall, 2 bottles of milk.
Take one down and pass it around, 1 bottle of milk on the wall.
1 bottle of milk on the wall, 1 bottle of milk.
Take one down and pass it around, no more bottles of milk on the wall.
No more bottles of milk on the wall, no more bottles of milk.
Go to the store and buy some more, 99 bottles of milk on the wall.
-
At the end of the song, the lyrics change because there is only one bottle (singular instead of plural).
-
Read the last lyrics, and you will see how the last line changes to
"Go to the store and buy some more, 99 bottles of milk on the wall."
.