Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import turtle;
t = turtle.Turtle();
w = turtle.Screen();
def right():
t.right(45);
def left():
t.left(45);
def up():
t.forward( 2 );
def down():
t.back( 2 );
w.onkey( right, "Right" );
w.onkey( left, "Left" );
w.onkey( up, "Up" );
w.onkey( down, "Down" );
w.listen();
@lipemat

This comment has been minimized.

Copy link
Owner Author

@lipemat lipemat commented May 10, 2014

This is like the most basic arbitrary example of turtle screen events. It is used strictly for teaching a beginner programmer some python basics.

Not to be used as a reference for my coding ability. I mean seriously guys. I would have to drink about 10 shots to numb my brain to the level of actually doing something useful with python.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment