daily pastebin goal
28%
SHARE
TWEET

Untitled

a guest Dec 10th, 2018 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import tkinter
  2. canvas=tkinter.Canvas(height="400", width="400", bg="papayawhip")
  3. canvas.pack()
  4.  
  5. from random import *
  6. for i in range(20):
  7.     Xsur = randint(100,300)
  8.     Ysur = randint(100,300)
  9.     canvas.create_rectangle(Xsur-10, Ysur-10, Xsur+10, Ysur+10, fill='blue', outline='yellow', width=5)
  10.     canvas.create_text(Xsur-10, Ysur-10, text=i)
  11.     canvas.after(100)
  12.     canvas.update()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top