Omniadisce

Computational physics 3.3: Functions that use functions

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.

11 steps ยท about 20 min

By the end you can

  • Write a function whose body calls another function
  • Follow what each call gives back
  • Work out an average speed as total distance รท total time
  • Put one call inside another, and read it from the inside out

Who it is for: Anyone who has done lessons 3.1 and 3.2, and physics lesson 2.2 (speed and average speed).

The steps

  1. A function inside a function
  2. Run it
  3. What does speed give back?
  4. Write the body
  5. The average speed of a journey
  6. Not the mean of the speeds
  7. The whole journey
  8. A call inside a call
  9. Inside out
  10. Read it inside out
  11. Building blocks

Discussion 0 comments

Log in to join the discussion.

× Enlarged view