Omniadisce

Computational physics 2.8: Mastery check — decisions and repeats

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.

17 steps · about 30 min

By the end you can

  • Read and write comparisons
  • Make a program choose with if, elif and else
  • Repeat with for and range, and with while
  • Keep running totals and counts in a loop
  • Print tables of free fall, and find a line that is outside its loop

Who it is for: Anyone who has worked through lessons 2.1 to 2.7.

The steps

  1. How the mastery check works
  2. At the edge
  3. A question, not an instruction
  4. Late or not?
  5. Which band?
  6. The order of the questions
  7. An error message
  8. range
  9. Speed after every second
  10. Galileo again
  11. Outside the loop
  12. Counting fast seconds
  13. One distance
  14. From a balloon
  15. How long until ...?
  16. A loop that never ends
  17. Walking, cycling, driving, flying

Discussion 0 comments

Log in to join the discussion.

× Enlarged view