I have no idea how to start writing this class. This is my basic outline.
class Turtle: def __init__(self): pass def setColor(self, color): self.color = color def penDown(self): pass def penUp(self): pass def moveForward(self, distance): self.moveForward = distance def turn(self, degrees): self.turnRight = degrees
I need help writing what should be in each function for a graphics package to use.
I put what I thought would be correct and then how would I use this?
something like
turtle = turtle()
turtle.moveForward(distance)?
This post has been edited by scrace89: 07 December 2009 - 11:16 AM

New Topic/Question
Reply




MultiQuote





|