• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
娃
博客园    首页    新随笔    联系   管理    订阅  订阅
上一页 1 2 3 下一页
2020年10月26日
turtle叠边形绘制
摘要: import turtle as t t.pensize(2) for i in range(9): t.fd(150) t.left(80) 阅读全文
posted @ 2020-10-26 20:06 娃 阅读(145) 评论(0) 推荐(0)
turtle风轮绘制
摘要: import turtle as t t.pensize(2) for i in range(4): t.seth(90*i) t.fd(150) t.right(90) t.circle(-150, 45) t.goto(0,0) 阅读全文
posted @ 2020-10-26 20:03 娃 阅读(293) 评论(0) 推荐(0)
在终端输出如下信息
摘要: def kanchai(name, age, gender): print "%s,%s岁,%s,上山去砍柴" %(name, age, gender) def qudongbei(name, age, gender): print "%s,%s岁,%s,开车去东北" %(name, age, ge 阅读全文
posted @ 2020-10-26 19:55 娃 阅读(61) 评论(0) 推荐(0)
2020年10月25日
叠加的等边三角形
摘要: import turtle turtle.right(60) turtle.forward(200) turtle.right(120) turtle.forward(200) turtle.right(120) turtle.forward(200) turtle.penup() turtle.f 阅读全文
posted @ 2020-10-25 23:03 娃 阅读(160) 评论(0) 推荐(0)
2020年10月18日
7段数码管绘制
摘要: import turtle, datetime def drawGap(): turtle.up() turtle.fd(5) def drawLine(draw): drawGap() if(draw): turtle.down() else: turtle.up() turtle.fd(40) 阅读全文
posted @ 2020-10-18 23:54 娃 阅读(163) 评论(0) 推荐(0)
2020年9月28日
画五角星
摘要: import turtle turtle.pensize(5) turtle.pencolor("yellow") turtle.fillcolor("red") turtle.begin_fill() for i in range(5): turtle.forward(100) turtle.ri 阅读全文
posted @ 2020-09-28 18:56 娃 阅读(158) 评论(0) 推荐(0)
绘制正方形
摘要: import turtle turtle.setup(800, 800, 200, 200) turtle.pencolor("black") turtle.pensize(5) turtle.penup() turtle.fd(-150) turtle.pendown() turtle.fd(10 阅读全文
posted @ 2020-09-28 16:46 娃 阅读(140) 评论(0) 推荐(0)
蟒蛇的绘制
摘要: import turtle turtle.setup(650, 350, 200, 200) turtle.penup() turtle.fd(-250) turtle.pendown() turtle.pensize(25) turtle.pencolor("purple") turtle.set 阅读全文
posted @ 2020-09-28 16:37 娃 阅读(198) 评论(0) 推荐(0)
2020年9月21日
玫瑰花
摘要: import turtle # 设置初始位置 turtle.penup() turtle.left(90) turtle.fd(200) turtle.pendown() turtle.right(90) # 花蕊 turtle.fillcolor("red") turtle.begin_fill( 阅读全文
posted @ 2020-09-21 23:34 娃 阅读(128) 评论(0) 推荐(0)
小猪佩奇
摘要: #!/usr/bin/env python2 # coding=utf-8 import turtle as t t.pensize(4) t.hideturtle() t.colormode(255) t.color((255,155,192),"pink") t.setup(840,500) t 阅读全文
posted @ 2020-09-21 23:18 娃 阅读(121) 评论(0) 推荐(0)
上一页 1 2 3 下一页
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3