# File: kennel.py # Author: Dr. Gibson # Date: 4/3/2017 # Section: N/A # E-mail: k.gibson@umbc.edu # Description: # This file contains python code that simulates a few # list-based tasks that kennel assistants might perform. def main(): # set up our kennel pens kennel = ["Alaskan Klee Kai", "Beagle", "Chow Chow", "Doberman", "English Bulldog"] # Assistant #1: What dogs are in the kennel? print() print("Assistant #1:") for dog in kennel: print(dog) # Assistant #2: What kennel pen number is each dog in? print() print("Assistant #2:") for index in range( len(kennel) ): print ("There is a", kennel[index], "in kennel pen", index) # Assistant #3: Update list the to be all German Shepherds print() print("Assistant #3:") for index in range( len(kennel) ): kennel[index] = "German Shepherd" # Assistant #3 only updated our list -- they didn't print anything # though, so we'll need to check it ourselves print("At the end of the day:") for dog in kennel: print(dog) main()