score=0
from time import sleep
window = Tk()
c = Canvas(window, width=800, height=500, bg='darkblue')
c.pack()
while True:
score = score + 1
if score == 1000 or score > 1000:
c.create_text(0, 0, \
text='You win!', fill='white', font=('Helvetica', 30))
sleep(5)
exit()
from tkinter import *
from time import sleep
window = Tk()
c = Canvas(window, width=800, height=500, bg='darkblue')
c.pack()
def text_show():
c.create_text(400,250, text='You win!',\
font=('Helvetica', 30), fill='white')
window.update_idletasks()
sleep(5)
exit()
c.after(500, text_show) # in milliseconds