Omniadisce

Computational physics 3.7: Mastery check — functions and lists

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

  • Define functions with def and return, and call them
  • Tell return from print
  • Use functions that call functions
  • Index lists from 0, and use len and append
  • Loop over a list, add up and find the mean
  • Find max, min and half the range

Who it is for: Anyone who has worked through lessons 3.1 to 3.6.

The steps

  1. How the mastery check works
  2. Call a function
  3. m/s to km/h
  4. The parts of a function
  5. Free fall
  6. Print or return?
  7. Return it
  8. Inside out
  9. A whole journey
  10. Which index?
  11. The first reading
  12. Append
  13. A loop over a list
  14. Add up as you go
  15. The mean
  16. The range of the readings
  17. The uncertainty
  18. A name to avoid

Discussion 0 comments

Log in to join the discussion.

× Enlarged view