首页 > 其他分享 >4-turtle接收用户的输入

4-turtle接收用户的输入

时间:2022-11-17 09:23:12浏览次数:47  
标签:turtle screen write answer 幸运 接收 输入

示例代码

import turtle

screen = turtle.Screen()
answer = screen.textinput("输入对话框", "请输入你的幸运数字:")

p=turtle.Pen()

if int(answer)==6:
	p.write("你输入的幸运数字"+answer)
else:
	p.write("我们终究在各自的平行世界")
turtle.done()

标签:turtle,screen,write,answer,幸运,接收,输入
From: https://www.cnblogs.com/reaptem/p/16898303.html

相关文章