I have a program which displays the randint number and the value of the randint. This works great but I need to close the turtle window without stopping the program because I need to do more commands after the turtle window is closed. Here is the code I have so far... # imports required libraries
import random
import turtle
# creates and configures window
wn = turtle.Screen()
wn.setup(800, 400)
wn.title("Random output")
wn.bgcolor("#3d3d3d")
wn.tracer(0)
# creates text
text = turtle.Turtle()
text.speed(0)
text.color("#ffffff")
text.penup()
text.hideturtle()
rep_Num = 0
for repeats in range(100000):
wn.update()
rand_Num = random.randint(0, 100)
rep_Num += 1
text.clear()
text.write(str(rep_Num) + ": " + str(rand_Num), align="center", font=("Comic Sans MS", 36,
"normal"))
# Its here I need to close the turtle window
That's all my code so far. Please help.