Omniadisce

Computational physics 4.8: Mastery check — NumPy

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.

18 steps · about 30 min

By the end you can

  • Make arrays, index them and do arithmetic on them as a whole
  • Make evenly spaced times with np.linspace
  • Use np.sum, np.mean, np.max, np.min, np.sqrt and np.sin (in radians)
  • Compare decimals with a tolerance, and write numbers in e notation

Who it is for: Anyone who has worked through lessons 4.1 to 4.7.

The steps

  1. How the mastery check works
  2. The second measurement
  3. Speeds in m/s
  4. A fall table
  5. A list times two
  6. Evenly spaced times
  7. How many gaps
  8. The mean time
  9. A trip's average speed
  10. The spread
  11. Fall times
  12. A ramp
  13. np.sin(90)
  14. 0.1 + 0.2 == 0.3
  15. A safe comparison
  16. Light across a distance
  17. A lost 1
  18. Count with a tolerance

Discussion 0 comments

Log in to join the discussion.

× Enlarged view