I spent entire day for it, help me :(

def digits_multiplication(number):
suma = sum(int (i) for i in number[::2])
res = suma * number[-1]
return res

print(digits_multiplication(12345))

OR

def digits_multiplication(number):
res = 0
for i in number[::2]:
res += i
return res * number[-1]

print(digits_multiplication(12345))

Created at: 2019/06/15 08:13; Updated at: 2019/06/15 08:13

The question is resolved.