Exercise

Array operating fluency

Operating on arrays is an integral part of working with data. Most of the time you are working with data in Julia, you will be working with arrays, so it is essential to know how to operate on this data type. In this exercise, you will build your array fluency.

Two 1D arrays, x and y, are available in your environment.

Instructions 1/4

undefined XP
  • 1
    • Multiply the array x by 3 and assign it to a.
  • 2
    • Subtract 5 from the array x and assign the result to b.
  • 3
    • Add the arrays x and y.
  • 4
    • Divide the each element of the array x by its corresponding element in y.