为什么弹出对话框不出现在这个图形中

2024-06-16 12:22:46 发布

您现在位置:Python中文网/ 问答频道 /正文

这是代码。这确实是对的,我尝试了最简单的方法,只是想看看是否出现了一个对话框,但仍然没有出现

from turtle import Turtle, Screen

tim = Turtle()
screen = Screen()
screen.setup(width=500, height=400)
tur_name = screen.textinput(title="Who will win?", prompt="Enter the turtle color:")
screen.exitonclick()

Tags: 方法代码namefromimportsetupwidthscreen