I am testing the Python script for a simple timer but it's not showing anything in the Tkinter window.
import time
from tkinter import *
def clicked():
val = int(val_Box.get())
val1 = 0
global display_Time
while val1 < val:
display_Time.configure(text=str(val))
display_Time = Label(window,text="",fg="Blue")
display_Time.grid(column=10,row=10)
time.sleep(1)
val -= 1
display_Time.configure(text="Timer Finished")
window = Tk()
window.title("Simple Timer App")
window.geometry("300x200")
clock_Time = Label(window,text= "Enter Clock Time",fg="Green")
clock_Time.grid(column=0,row=0)
val_Box = Entry(window,width = 10,bg = "Yellow")
val_Box.grid(column=1,row=0)
display_Time = Label(window,text="" ,fg="Blue")
display_Time.grid(column=2,row=10)
start_Button = Button(window,text = "START",fg = "Blue",command = clicked)
start_Button.grid(column=0,row=10)
window.mainloop()
The output is not showing the sequential decrease of the entered value. I need some suggestions.
This is how the timer looks like.
