Move turtle using the arrow keys in Python

0 votes
How do I move the turtle using the arrow keys in python? I know you have to use the wn module but I don't know how to.
Jul 5, 2019 in Python by Rhea

1 answer to this question.

0 votes

You can use something like this:

wn.onkey(move_up, 'Up')
wn.onkey(move_left, 'Left')
wn.onkey(move_right, 'Right')
wn.onkey(move_down, 'Down')
answered Jul 5, 2019 by Travis

Related Questions In Python

+2 votes
3 answers

How can I play an audio file in the background using Python?

down voteacceptedFor windows: you could use  winsound.SND_ASYNC to play them ...READ MORE

answered Apr 3, 2018 in Python by charlie_brown
• 7,780 points
0 votes
1 answer
0 votes
1 answer
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 1,183 views
0 votes
0 answers
+4 votes
6 answers
0 votes
1 answer
0 votes
1 answer

Snake head placed on the center - Python using turtle

You can use turtle's goto() function. This ...READ MORE

answered Jun 21, 2019 in Python by Greg