Main.ProgrammingErrors History

Hide minor edits - Show changes to markup

January 21, 2010, at 01:35 PM MST by 129.82.44.241 -
Added lines 1-22:

(:source lang=python:)

"""The different kinds of errors you can have in a program"""

  1. python will only run programs that are syntactically correct
  2. i.e. have no syntax errors
  3. if you type the following into the python interpreter you
  4. will get a syntax error

print 1 1

  1. Runtime error - your program tried to do something wrong while running
  2. This yields what's called an exception
  3. Example: division by 0

print 1 / 0

  1. Semantic errors - your program is not doing what you thought it should

print 1 / 2

(:sourceend:)