March 2014 update
This commit is contained in:
parent
09687c4926
commit
a25938f123
1846 changed files with 21876 additions and 5203 deletions
6
Task/Mandelbrot-set/Python/mandelbrot-set-2.py
Normal file
6
Task/Mandelbrot-set/Python/mandelbrot-set-2.py
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import math
|
||||
mandelbrot = lambda z , c , n = 40 : float('nan') if abs(z) > 1000 else mandelbrot(z**2+c,c,n-1) if n > 0 else z**2+c
|
||||
print("\n".join(["".join(["#" if not math.isnan(mandelbrot(0,x+1j*y).real) else " "
|
||||
for x in [a*0.02 for a in xrange(-80,30)]])
|
||||
for y in [a*0.05 for a in xrange(-20,20)]])
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue