Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python3
- import cmath
- import sys
- def mandelbrot(c, n, z):
- for i in range(0, n):
- z = z*z + c
- return z
- def main():
- n = sys.argv[1]
- debug = sys.argv[2]
- c = 0.04 + 0.01j
- z = mandelbrot(c, int(n), 0 + 0j)
- if debug == "debug":
- print("z=" + str(z))
- return 0
- if __name__ == "__main__":
- main()
Add Comment
Please, Sign In to add comment