Omniadisce

Computational physics 1.3: Changing a variable, and formulas

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.

13 steps ยท about 20 min

By the end you can

  • Say what a variable holds after it is given a new value
  • Add to a variable with a line like distance = distance + 50
  • Write a formula as a line of code: speed = distance / time
  • Put the lines of a program in an order that works

Who it is for: Anyone who has done lesson 1.2 (variables).

The steps

  1. A first guess
  2. A new value replaces the old
  3. When does print look?
  4. Using the old value
  5. Work it out
  6. Add to the trip
  7. A formula as a line of code
  8. Run the formula
  9. Write the formula
  10. Turning the formula round
  11. Your turn: a distance
  12. The order of the lines
  13. In your own words

Discussion 0 comments

Log in to join the discussion.

× Enlarged view