Omniadisce

Computational physics 4.2: Arithmetic on a whole array at once

Lesson Beginner

Join free to take this lesson

Anyone can look around, but taking a lesson needs a free account. With one, your answers are checked step by step and your progress is saved, so you can stop and pick up where you left off on any device.

12 steps ยท about 20 min

By the end you can

  • Do arithmetic with a number on every element of an array at once
  • Tell what * 2 does to an array from what it does to a list
  • Write a formula such as 0.5 * 9.81 * times**2 for a whole array
  • Combine two arrays of the same length element by element

Who it is for: Anyone who has done lesson 4.1 (NumPy and arrays).

The steps

  1. Times two
  2. Every element, all at once
  3. km/h to m/s
  4. Minutes to seconds
  5. A whole formula at once
  6. Free fall, without a loop
  7. Squared, in Python
  8. Two arrays together
  9. Each runner's speed
  10. Arrays of different lengths
  11. Speed while falling
  12. A list and a loop, or an array

Discussion 0 comments

Log in to join the discussion.

× Enlarged view