old_contents: """
      compass.py
      ~~~~~~~~~~
  
      Creates a compass.
  
      The user will need to calibrate the compass first. The compass uses the
      built-in clock images to display the position of the needle.
  
  """
  from microbit import *
  
  
  # Start calibrating
  compass.calibrate()
  
  # Try to keep the needle pointed in (roughly) the correct direction
  while True:
      sleep(100)
      needle = ((15 - compass.heading()) // 30) % 12
      display.show(Images.ALL_CLOCKS[needle])
  
new_contents: """
      compass.py
      ~~~~~~~~~~
  
      Creates a compass.
  
      The user will need to calibrate the compass first. The compass uses the
      built-in clock images to display the position of the needle.
  
  """
  from microbit import *
  
  
  # Start calibrating
  compass.calibrate()
  
  # Try to keep the needle pointed in (roughly) the correct direction
  while True:
      sleep(100)
      needle = ((15 - compass.heading()) // 30) % 12
      display.show(Image.ALL_CLOCKS[needle])
  
subject: Fix error in compass.py script in examples.