Omniadisce

Computational physics 1.8: Mastery check — your first programs

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.

20 steps · about 30 min

By the end you can

  • Write and fix print lines and sums
  • Store, change and use variables in formulas
  • Use comments and labels
  • Get the order of operations and powers right
  • Convert units in a program
  • Read NameError, SyntaxError and TypeError messages

Who it is for: Anyone who has worked through lessons 1.1 to 1.7.

The steps

  1. How the mastery check works
  2. Text or a sum?
  3. A division
  4. A misspelt word
  5. What does it print?
  6. Speed from distance and time
  7. Add to a variable
  8. A valid name
  9. Lines in the wrong order
  10. A comment
  11. A labelled result
  12. A mean
  13. A falling stone
  14. Squaring t
  15. km/h to m/s
  16. Light to the Moon
  17. Fix the bracket
  18. Reading a TypeError
  19. A number in quotes
  20. The bug Python can't see

Discussion 0 comments

Log in to join the discussion.

× Enlarged view