import fractal
import bmp

pixels = fractal.mandelbrot(488, 256)

bmp.write_grayscale('mandel.bmp', pixels)
import fractal
import bmp


def main():
    pixels = fractal.mandelbrot(488, 256)

    bmp.write_grayscale('mandel.bmp', pixels)


if __name__ == '__main__':
    main()

Add a main runner for mandel
Add a main runner for mandel

  import fractal
  import bmp
  
- pixels = fractal.mandelbrot(488, 256)
  
+ def main():
+     pixels = fractal.mandelbrot(488, 256)
+ 
- bmp.write_grayscale('mandel.bmp', pixels)
+     bmp.write_grayscale('mandel.bmp', pixels)
+ 
+ 
+ if __name__ == '__main__':
+     main()
+ 
Add a main runner for mandel
## Code Before:
import fractal
import bmp

pixels = fractal.mandelbrot(488, 256)

bmp.write_grayscale('mandel.bmp', pixels)
## Instruction:
Add a main runner for mandel
## Code After:
import fractal
import bmp


def main():
    pixels = fractal.mandelbrot(488, 256)

    bmp.write_grayscale('mandel.bmp', pixels)


if __name__ == '__main__':
    main()
