# Import packages
import numpy as np
# Define an array of numbers
foo = np.array([0, 1, 2, 3, 4, 5])
# Define a function that squares numbers
def bar(x):
return x * x
# Loop over each element and perform an action on it
for element in foo:
# Print the result of bar
print(bar(element))
0
1
4
9
16
25