Omniadisce

Computational physics 1.1: Your first program

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.

14 steps ยท about 20 min

By the end you can

  • Say what a program is and in which order its lines run
  • Run a program and read the number it prints
  • Use print to show a number or a sum
  • Tell print(2 + 3) from print("2 + 3")
  • Write sums with +, โˆ’, * and /
  • Read an error message and fix a misspelt word

Who it is for: Anyone. No programming needed: this is the very first lesson.

The steps

  1. A first guess
  2. What a program is
  3. print shows something
  4. Run your first program
  5. A number, or text?
  6. Which one prints 12?
  7. Python's arithmetic signs
  8. Times, in Python
  9. Lines run in order
  10. Add a line
  11. Errors are normal
  12. Reading an error
  13. Fix the bug
  14. In your own words

Discussion 0 comments

Log in to join the discussion.

× Enlarged view