I have to make my own turtle class without using the "from turtle import *" line.

This is the code i have so far:

from graphics import *

class Turtle:
    '''The turtle'''
    def __init__(self, win, defstep, defwidth, defangle, startpt, startangle):
        '''initialize the turtle
        - win: window to draw
        - defstep: default stepsize
        - defangle: default angle
        - startpt: the starting position
        - startangle: the starting orientation angle

    def step(self, penDown):

        '''make a step (draw if penDown==True) and update the state'''

    def rotate(self, angle):

    def scale(self, scalefactor):

    def draw(self, str):
        line = Line ( firstPoint, secondPoint)
        '''This function does the interpretation of the LS string str.
        Loop over characters in the str using the parseArg function. Every
        call to parseArg will return three values c,par,nextindex.
        Decide what to do for every character c (and use the right argument if 
        an argument was given and found in the string).

        To draw a line:
          line = Line( firstPoint, secondPoint)

        This is also the function where you need the Stack class. When
        you encounter the '[' character you have to push the state and
        when you encounter the ']' character you have to pop a state
        from the stack.

        Please be aware not to push a reference to the state on the
        stack (you will be overwriting it). I advise to have a method
        clone in the State class that really makes a new state object
        that you can safely push on the stack.

Do any of you have any tips on how to start this?

Seems that teacher already gave you advice., follow first those.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.