lundi 28 mars 2016

Syntax error at the if/elif statement, not sure what's causing the error

I keep getting a syntax error at the if statement, and I'm not sure why I'm getting the error. Can anyone help?

def draw_square(self, loc, width):

    loc = (x, y)
    for i in range (3):
        width(width)
        turtle.forward(60)
        turtle.right(90)
        turtle.forward(random.randint(10,100))
        turtle.right(90)
        turtle.forward(60)
        turtle.right(90)
        turtle.forward(random.randint(10, 100))

    if turtle.xcor < or > x:
        x = turtle.xcor
    elif turtle.ycor < or > y:
        y = turtle.ycor

    return self.loc, self.width

Aucun commentaire:

Enregistrer un commentaire