#You will notice I have given some test cases, but #it pays to be a "doubting Thomas" and add others. # #Problem 0: # write code to tell if item is in at an even-numbered # index of x. # x = [2,3,4,5] item = 2 print(item in x[::2]) item = 5 print(not(item in x[::2])) ##prints true if test passes. # #Problem 1: # write code to tell if item is in at an odd-numbered # index of x. # x = [2,3,4,5] itme = 2 # #Problem 2: x = [1,2,3,4,5,6,7,,8,9,10] #write code that chops off the head and tail of a list # of any length print(x == [2,3,4,5,6,7,8,9,10]) # # #Problem 3: x = ["cat", "dog", "elephant", "ferret", "goat", "hyena", "cat"] item = "cat" #write code to see if item is present in the list more than once. # #Problem 4: There is a builtin function named sum. Use it here. x = [2,3,4,5,6,7] result = 15 ##calculate the sum of the odd-indexed entries # # #Problem 5: Create an empty list. Add the items #"Lincoln", "Jefferson", "Washington", "Grant" to the list #in that order, one at a time. Print the list. Then empty it. #and print the result. presidents = [] # #Problem 6: # # #Problem 7: # # #Problem 8: #