Assignment-7 ============ 1. Write a python function that returns the index of the smallest element in a list of integers. If the number of such elements is greater than 1, return the smallest index. Use the following function header: def indexOfSmallestElement(lst): Ans:- ===== def indexOfSmallestElement(lst): smallValue = min(lst) return lst.index(smallValue) lst = [20,10,30,10,50,40,10] smallIndex = indexOfSmallestElement(lst) print(smallIndex); Output:- ======== 1 ================================================================================================== 2. Write the python function mostCommonName, that takes a list of names (such as ["Ja ne", "Aaron", "Cindy", "Aaron"], and returns the most common name in this list (in this case, "Aaron"). If there is more than one such name, return a set of the most common names. So mostCommonName(["Jane", "Aaron", "Jane", "Cindy", "Aaron"]) returns the set {"Aaron", "Jane"}. If the set is empty, return None. Also, treat names case sensitive, so "Jane" and "JANE" are different names. Ans:- ===== def mostCommonName(lst): dict_of_counts = {item:lst.count(item) for item in lst} max_frequent_val = max(dict_of_counts.values()) res = {key for key in dict_of_counts if dict_of_counts[key] == max_frequent_val} return res lst = ["Jane", "Aaron", "Jane", "Cindy", "Aaron"] mostCommonList = mostCommonName(lst); print(mostCommonList) Output:- ========   {'Jane', 'Aaron'} ============================================================================================= 3. Write the python function isPalindromicList(a) that takes a list and returns True if it is the same forwards as backwards and False otherwise. Ans:- ===== def isPalindromicList(strVal): if strVal == strVal[::-1]: print("The list is a palindrome") else: print("The list isn't a palindrome") lst = [77, 1, 56, 65, 1, 77] print("The list is :") print(lst) my_list = ' '.join([str(elem) for elem in lst]) isPalindromicList(my_list) Output:- ========   The list is : [77, 1, 56, 65, 1, 77] The list is a palindrome