👤

Jak zrobic takie coś że jeśli kliniemy np Y to kolor rysowania zmienia nam sie na yellow czy mógł bym prosic program ja kakie cos zrobilem:
from turtle import *
t = Turtle()
t.color('blue')
t.width(5)
t.shape('circle')
t.pendown()
t.speed(3)

def draw(x, y):
t.goto(x, y)

def move (x,y):
t.goto(x, y)
t.ondrag(draw)
scr = t.getscreen()
scr.onscreenclick(move)