79602351

Date: 2025-05-01 18:26:09
Score: 2
Natty:
Report link

tkinter: import tkinter as tk class SimpleDrawApp: def _init_(self, root): self.root = root self.root.title(' ') self.canvas = tk.Canvas(root, bg='white', width=500, height=400) self.canvas.pack() self.canvas.bind('<B1-Motion>', self.draw) def draw(self, event): x, y = event.x, event.y r = 3self.canvas.create_oval(x-r, y-r, x+r, y+r, fill='black') if _name_ == '_main_': root = tk.Tk() app = SimpleDrawApp(root) root.mainloop()

Reasons:
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Gob L