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):

In [ ]:
def get_index_of_smallest(numbers):
    return numbers.index(min(numbers))+1

print(get_index_of_smallest([23, 3, 6, 2, 5, 12, 9, 7, 4]))

2. Write the python function mostCommonName, that takes a list of names (such as ["Jane", "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

In [ ]:
from collections import Counter
    data_set = ["Jane", "Aaron", "Cindy", "Aaron"]
    most_occur = data_set.most_common()
print(most_occur)

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

In [10]:
number=int(input("Enter any number :"))
#store a copy of this number
temp=number
#calculate reverse of this number
reverse_num=0
while(number>0):
    #extract last digit of this number
    digit=number%10
    #append this digit in reveresed number
    reverse_num=reverse_num*10+digit
    #floor divide the number leave out the last digit from number
    number=number//10
#compare reverse to original number
if(temp==reverse_num):
    print("True")
else:
    print("False")
Enter any number :12
False
In [ ]: