Using Modules
Importing a module
Syntax: import module_name
import mandelbrot
p = 1+0.5j
if mandelbrot.inMandelbrotSet(p):
print “%f+%fj is in the set” % (p.real, p.imag)
else:
print “%f+%fj is NOT in the set” % (p.real, p.imag)
Previous slide
Next slide
Back to first slide
View graphic version