1.Python 通过缩进而不是{}来表示程序块

2.Python 区分大小写

3.注释:a.行注释用 # 表示

              b.段注释用 三个连续 单引号

 

2019.5.8 Python程序格式 和 海龟绘图

 

4.import turtle #导入turtle模块

turtle.showturtle()   #显示箭头

turtle.write("alla")   #写字符串

turtle.forward(300) #前进300像素

turtle.color("red")      #画笔颜色改为red 
turtle .left(90)           #箭头左转90度

turtle.goto(0,50)       #去坐标(0,50)

turtle.penup()          #抬笔,让路径不被画出

turtle.pendown()    #下笔

turtle.circle(100)       #画圈 

2019.5.8 Python程序格式 和 海龟绘图

通过海龟坐标学习后绘制奥运五环

 

2019.5.8 Python程序格式 和 海龟绘图

相关文章:

  • 2021-10-08
  • 2022-02-21
  • 2022-12-23
  • 2021-12-29
  • 2022-12-23
  • 2021-05-22
  • 2022-02-21
猜你喜欢
  • 2021-11-28
  • 2021-08-25
  • 2021-09-04
  • 2021-07-02
  • 2021-12-29
  • 2021-04-18
  • 2022-12-23
相关资源
相似解决方案