I have an array:
array = [10, 10, 10, 10, 10]
I want to loop through this array so that it gets a "slope" based on an integer. So if the integer is 2 the result would be:
array = [0, 5, 10, 5, 0]
If I had a even bigger array:
bigArray = [50, 50, 50, 50, 50, 50, 50, 50, 50, 50]
then if the integer is still 2 the result would be:
bigArray = [0, 25, 50, 50, 50, 50, 50, 50, 25, 0]
The value of the integer doesn't matter, as long as the array has "smooth" ends to it like shown above. The integer just specifies how many indices are affected.