I have a project to do for my CMPT 120 Class. And it's using basic python coding.
I'm trying to write my name out with block letters. 'JAX'
I need to use for loops
and i'm stuck on my X
here's the code for it
def x(n):
t3=turtle.Pen()
t3.left(60)
t3.forward(n)
t3.left(60)
t3.forward(n)
t3.right(120)
t3.forward(n)
t3.right(60)
t3.forward(n/2)
t3.left(120)
t3.forward(n/2)
t3.right(60)
t3.forward(n)
t3.right(120)
t3.forward(n)
t3.left(60)
t3.forward(n)
t3.right(120)
t3.forward(n)
t3.right(60)
t3.forward(n/2)
t3.left(120)
t3.forward(n/2)
t3.right(60)
t3.forward(n)
I've separated it in parts that are similar which i can loop, but there is the
t3.right(120)
that's odd in the loop, is there a way i can still use a for loop?
thanks
ha, i need help asap, project is due tomorrow.
Thanks
Jackie