#!/usr/bin/env python3; ############################################################################### # This program prints the lyrics to 99 Bottles of Beer. # # Copyright © 2017 Richard Lesh. All rights reserved. ############################################################################### def print_verse(num) : num_bottles = str(num) + " bottle" if (num != 1) : num_bottles += "s" num_minus_one_bottles = "No" if num == 1 else str(num - 1) num_minus_one_bottles += (" bottle" if num == 2 else " bottles") print(num_bottles + " of beer on the wall.") print(num_bottles + " of beer.") print("If one of those bottles should happen to fall.") print(num_minus_one_bottles + " of beer on the wall.") print() # Begin Main for i in range(99, 0, -1) : print_verse(i)