13 lines. I really not like lines being over 80 - 100 characters but, it works
from turtle import Turtle, Screen, colormode from random import randint class Turtles(Turtle): def __init__(self): super().__init__() self.speed('fastest'), self.shapesize(5), colormode(255), Screen(), Screen().onclick(self.click), self.ondrag(self.draw), Screen().onkey(self.colors, 'c'), Screen().listen(), Screen().mainloop() def colors(self): self.color((randint(0, 255), randint(0, 255), randint(0, 255))) def click(self, x, y): self.penup(), self.goto(x,y), self.pendown() def draw(self, x, y): self.ondrag(None), self.goto(x, y), self.ondrag(self.draw, btn=1) Turtles()
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags