All pastes #2095523 Raw Edit

Anonymous

public python v1 · immutable
#2095523 ·published 2011-11-24 20:40 UTC
rendered paste body
import sys# True si el complex 'c' pertany a el conjunt de Mandelbrot, False sino.def es_mandelbrot(c):	z = 0	for i in range(100):		z = z*z+c;	return abs(z) < 4# Dibuixem de (-2, -1) a (1, 1), en un rectangle 75x50.for y in range(50):	for x in range(75):		if es_mandelbrot(((x/25.0)-2.0) + ((y/25.0)-1.0) * 1j):			sys.stdout.write('#')		else:			sys.stdout.write(' ')	sys.stdout.write('\n')