A Cow is a dictionary with the following keys: ‘age’ which…
Questions
A Cоw is а dictiоnаry with the fоllowing keys: 'аge' which is an integer representing the age of the cow 'breed' which is a string representing the breed of the cow(e.g., Holstein) 'name' which is a string representing the name of the cow Define a function compare_cow_lists that consumes three parameters (two lists of cows and a string) and produces a string (eigher 'first', 'second' or 'equal'. The first two parameters are the first list of cows and the second list of cows. The third parameter is a string representing a given breed of cow. The function should determine which of the two lists has the most cows of the given breed. If the first list of cows hasmore of the given breed than the second list, then produce the string 'first'. If the second list has more, then produce the string 'second'. Otherwise, produce the string 'equal'. If you accidently erase the code, you can copy it from here. from cisc108 import assert_equal cows1 = [ {'age':5, 'breed':'Holstein', 'name':'Bessie'}, {'age':5, 'breed':'Aberdeen', 'name':'Brownie'}, {'age':5, 'breed':'Hereford', 'name':'Buttercup'} ]cows2 = [ {'age':5, 'breed':'Holstein', 'name':'Clarabelle'}, {'age':5, 'breed':'Holstein', 'name':'Dottie'}, {'age':5, 'breed':'Hereford', 'name':'Magic'} ]cows3 = [ {'age':5, 'breed':'Holstein', 'name':'Nellie'} ]cows4 = [] #put your code here assert_equal(compare_cow_lists(cows1,cows2,'Holstein'),'second')assert_equal(compare_cow_lists(cows1,cows3,'Aberdeen'),'first')assert_equal(compare_cow_lists(cows1,cows2,'Hereford'),'equal')assert_equal(compare_cow_lists(cows1,cows4,'Holstein'),'first')