Turtle Events | Keyboard and Mouse controls | Turtle | Python

Published: 28 June 2021
on channel: Vivek Kumar
61
11

In this video, I have talked about events in turtle i.e, I have explained how we can control our turtle with the help of our keyboard and mouse. In earlier videos, I have talked how we can write code and how it is executed by turtle but in this video I have talked about controlling turtle with keyboard and mouse. Hope this video will be helpfull for all of it's viewers.

Link to subscribe the channel:
   / @vkcodingworld854  

Link for the playlist of python turtle:
   • Playlist  

CODES EXPLAINED IN THIS VIDEO:
import turtle
#
screen = turtle.Screen()
#
name = turtle.Turtle()
#
def forward(x,y):
return name.forward(100)
def turn(x,y):
return name.left(90)
# screen.onclick(forward, 1)
screen.onscreenclick(turn, 3)
# name.ondrag(name.goto)
# screen.listen()
def func():
name.forward(100)
name.left(60)
# screen.onkeypress(func, "Up")
screen.onkeyrelease(func, "Up")
#
# turtle.done()


Watch video Turtle Events | Keyboard and Mouse controls | Turtle | Python online without registration, duration hours minute second in high quality. This video was added by user Vivek Kumar 28 June 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 61 once and liked it 11 people.