I asked a question like this here: How to adjust Label in tkinter?
But the events load up and eventually python can't handle the events, and it crashes.
How to make this not happen?? Maybe because it's in a loop, so they overload? I can't figure out how to make it not crash.
Here is my code:
from tkinter import *
from time import *
print("""This is an app that basically you time the amount of time someone takes to fall from a cliff, then we will
use an equation to tell you how high the cliff is.
This is a recreation of the app Mark Rober created, by The way""")
window = Tk()
window.title("falling app")
window.geometry("700x700")
window.configure(bg = "sky blue")
"""We will use time import for this"""
mins = 0
seconds = 0
secs = Label(window, text = seconds, font = ("verdana", 60))
secs.place(relx = 0.48, rely = 0.35, anchor = "nw")
def start():
mins = 0
seconds = 0
while seconds != 60:
sleep(1.00)
seconds+= 1
secs.configure(text = seconds)
if seconds == 60:
mins = mins+1
seconds = 0
This line: secs.configure(text = seconds) is the culprit. Im sure of it.
Thanks in advance!!!!!!!!
Edit: This is what it looks like, it blanks out, and becomes unresponsive.
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)