用户:CLP666查看:0 回复:0 评论:0 创建时间:2022-04-10T17:24:33
【作品展示】

【作品介绍】
Ta可以画三角形、正方形、五边形,你想看看么?
【作品源代码】
import turtle as t
import time
name = input('你的名字:')
print('您好', end = ',')
time.sleep(0.5)
print(name, end = ',')
time.sleep(0.5)
print('你想让我画什么?')
time.sleep(0.5)
print('我会画三角形、正方形、五边形。')
draws = input('我想让你画')
time.sleep(0.5)
if draws == '三角形' or draws == '正方形' or draws == '五边形':
if draws == '三角形':
size = 3
elif draws == '正方形':
size = 4
elif draws == '五边形':
size = 5
else:
pass
t.color('black')
t.pensize(5)
t.speed(5)
for i in range(size):
t.forward(100)
t.right(360 / size)
else:
print('我还不会画' + draws)
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn