Hi, I just received a project in my class where i have to write my own turtle class in python which I will have to use to draw a Koch snowflake. Currently I have no idea on how to get started on the turtle class? If anyone knows or has any tip please reply! Thanks.

Well, now I understand koch snowflake, but how would I write the turtle class to draw it because for this project we have to write our own turtle class, this is what I have so far:

class Turtle:
def __init__(self, location, direction):
self.location = location
self.direction = direction * math.pi / 180
def moveTo(self, somePoint):
some code..
def draw(self, length, win):
some code..
def turn(self, degrees):
some code..

I don't understand how to actually draw the line and then rotate it in python????

You need to start out with a GUI toolkit like Tkinter that comes with Python. That will do the actual drawing.

The turtle will point in a certain direction and you have to use trigonometry to calculate the length of the line and its end point (x, y) from the angle the line has to be drawn.

Need some help with this Array. I am trying to get the sum of the even numbers and the sum of the odd numbers using a for each loop. I know the answers to what I am trying to achive are sum of even = 84 and the sum of ...

When I execute this progammatically, I get a table with row heights much larger than when I do this manually.

Note : Sel is the Word.Selection object and the Clipboard contains an Excel Table.

public void AddClipboard()
{
Sel.PasteExcelTable(false,false, false);
var t = Sel.Tables[Sel.Tables.Count];
t.AutoFitBehavior(Word.WdAutoFitBehavior.wdAutoFitContent);
}

I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...