Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import*
- from random import *
- from time import *
- class Ball:
- def __init__(self, canvas, color):
- self.canvas = canvas
- self.id = canvas.create_oval(10,10,25,25,fill=color)
- self.canvas.move(self.id, 225, 180)
- root = Tk()
- root.title('Пинг-понг')
- canvas = Canvas(width = 500, height = 400, bg = 'deepskyblue')
- canvas.pack()
- ball = Ball(canvas, 'red')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement