In general, unlike many other technical computing languages, Julia does not expect programs to be written in a vectorized style…