A- A A+

Python Programming Task

 

Using loops write a computer programme to display the lyrics to the nursery song '10 Green Bottles'

 

Ten green bottles
Hanging on the wall
Ten green bottles
Hanging on the wall
And if one green bottle
Should accidentally fall
There'll be nine green bottles
Hanging on the wall
One green bottle
Hanging on the wall
One green bottle
Hanging on the wall
If that one green bottle
Should accidentally fall
There'll be no green bottles
Hanging on the wall

 

Extension task: allow the user to enter the number of bottles to start with.