快捷导航

扫一扫,访问微社区

QQ登录

只需一步,快速开始

切换风格

红色

python画正方形

weber 发表于 2020-4-20 22:49:47 | 显示全部
用python画一个边长为100的长方形,代码如下:
import turtle
t=turtle.Turtle()
t.forward(100)
t.right(90)
t.forward(100)
t.right(90)
t.forward(100)
t.right(90)
t.forward(100)
t.hideturtle()
回复

使用道具 举报

评论列表 ( 评论1 ) 显示全部 倒序浏览

  • weber

    楼主| 2020-4-20 22:51:39
    如果用python画一个长方形,代码如下:
    import turtle
    t=turtle.Turtle()
    t.forward(150)
    t.right(90)
    t.forward(100)
    t.right(90)
    t.forward(150)
    t.right(90)
    t.forward(100)
    t.hideturtle()
    回复 支持 反对 使用道具 举报
  • 您需要登录后才可以回帖 登录 | 注册入村

    首页

    论坛

    导读

    我的

    快速回复 返回顶部 返回列表