Lists

Bird Banding 1


The number of birds banded at a series of sampling sites has been counted by your field crew and entered into the following list. Counts are entered in order and sites are numbered starting at one. Cut and paste the list into your assignment and then answer the following questions by printing them to the screen. Some Python functions that will come in hand include len(), max(), min(), and sum().

number_of_birds = [28, 32, 1, 0, 10, 22, 30, 19, 145, 27, 36,
                   25, 9, 38, 21, 12, 122, 87, 36, 3, 0, 5, 55,
                   62, 98, 32, 900, 33, 14, 39, 56, 81, 29, 38,
                   1, 0, 143, 37, 98, 77, 92, 83, 34, 98, 40,
                   45, 51, 17, 22, 37, 48, 38, 91, 73, 54, 46,
                   102, 273, 600, 10, 11]
  1. How many sites are there? Hint: the function len() works on lists as well as strings.
  2. How many birds were counted at site 42? Remember, the number of the site and the number of its position may not be exactly the same.
  3. How many birds were counted at the last site? Have the computer choose the last site automatically in some way, not by manually entering its position.
  4. What is the total number of birds counted across all of the sites?
  5. What is the smallest number of birds counted?
  6. What is the largest number of birds counted?
  7. What is the average number of birds seen at a site? You will need to combine two built-in functions.
[click here for output]