this is the python code i am working on 2 hours of sleep please help me get this to work the question for the code was to write a program to multiply all the elements of the list at even indexes.
def EvenProduct(arr, n):
even = 1
for i in range (0,n):
if (i % 2 == 0):
even *= arr[i]
print("Even Index Product : " , even)
# Driver Code
arr = int(input("Enter the size of the list "))
print("\n")
num_list = list(int(num) for num in input("Enter the list items separated by space ").strip().split())[:arr]
print("User list: ", num_list)
n = len(arr)
EvenProduct(arr, n)
and i got this error
Traceback (most recent call last):
File "<string>", line 26, in <module>
TypeError: object of type 'int' has no len()