Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def fun(lista, krotka):
- nowaLista = lista[:]
- x, y, z = krotka
- for i in range(1, len(lista) - 1):
- nowaLista[i] = (lista[i - 1] * x + lista[i] * y + lista[i + 1] * z) / (x + y + z)
- return nowaLista
- print(fun([3, 1, 2, 0, 4], (1, 1, 1)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement