Question: Function 1 : Determining How Many Squirrels Were Observed in a Shift Your function should do the following: Take in a list containing the shifts

Function 1: Determining How Many Squirrels Were Observed in a Shift
Your function should do the following:
Take in a list containing the shifts the squirrels were observed in (use the test data as an example)
Use a loop and if/else statements to check if the shift is 'AM' or 'PM'
Count up how many squirrels were observed in the AM shift and how many were observed in the PM shift
Return the the totals for the two shifts
Function 2: Getting a List of Unique Fur Colors
Your function should do the following:
Take in a list of fur color data (use the test data as an example)
Create a list that can be used to keep track of the unique colors of squirrels
Loop over the list of all squirrel colors using a for or while loop
Use if/else statements to determine if the color should be added to you list of unique colors or not
Add unique colors to your list as you find them
Return the list of unique colors
If you aren't sure how to look for a specific value or values in a list, you can read about the uses of in when writing Python code here. You can also check if something not in a list using not in.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!