# draw a dragon curve fractal using Tinter's turtle
# dense version using recursion
# modified from: http://www.rosettacode.org/wiki/Dragon_curve
from turtle import *
def dragon(step, length, zig=right, zag=left):
if step <= 0:
step -= 1
length /= 1.41421
dragon(step, length, right, left)
dragon(step, length, left, right)
# set to False to speed things up (default is True)
# draw in this color
# turtle by default starts at (x=0, y=0) center of display
# lift pen up to move to the left by 130 units and up 70 units
# then drop the pen down to start drawing
# experiment with step and length
step = 12
length = 300
# gives some viewing time ...
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...
Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...
Hi I'm having a problem implementing a mini shopping cart drop down in the header to show the user all the products they have in their shopping cart. It seems the only solution for this is Ajax, and I've looked all over and can't find anything that I could possibly ...