If you don't know what it is
http://i.telegraph.co.uk/multimedia/archive/01677/dog_1677568i.jpg
What I want to know is how do I make it stop at the borders of the screen?
http://i.telegraph.co.uk/multimedia/archive/01677/dog_1677568i.jpg
Code:
#Setup document (800x600)
#Create the drawing surface -
from turtle import *
def move_up():
setheading(90)
forward(5)
def move_down():
setheading(270)
forward(5)
def move_left():
setheading(180)
forward(5)
def move_right():
setheading(0)
forward(5)
def clear_screen():
clear()
bgcolor("grey")
st()
title("eTCH!")
speed(0)
bgcolor("grey")
setup(width=800, height=600)
penup()
pensize(3)
pendown()
onkey(move_up, 'Up')
onkey(move_down, 'Down')
onkey(move_left, 'Left')
onkey(move_right, 'Right')
onkey(clear_screen, 'c')
listen()
exitonclick()
What I want to know is how do I make it stop at the borders of the screen?

