中文字幕精品无码一区二区,成全视频在线播放观看方法,大伊人青草狠狠久久,亚洲一区影音先锋色资源

2.3 周而復始的循環(多彩幾何) 學習任務單 2023—2024學年教科版(2019)高中信息技術必修1

資源下載
  1. 二一教育資源

2.3 周而復始的循環(多彩幾何) 學習任務單 2023—2024學年教科版(2019)高中信息技術必修1

資源簡介

多彩幾何學案
認識Python
打開Python的運行環境
在界面中新建文件
輸入具體的代碼
保存文件
運行代碼文件
顯示運行結果
導入turtle模塊
import turtle
二、看一看、練一練
1、畫一個邊長為50的圓形
import turtle
turtle.circle(50)
turtle.done()
畫一個邊長為50的紅色正三角形
import turtle
turtle.color("red","red")
turtle.begin_fill()
turtle.circle(50,steps=3)
turtle.end_fill()
畫一個邊長為50的黃色正四邊形
import turtle
turtle.color("yellow","yellow")
turtle.begin_fill()
turtle.circle(50,steps=4)
turtle.end_fill()
畫一個邊長為50的藍色正五邊形
import turtle
turtle.color("blue","blue")
turtle.begin_fill()
turtle.circle(50,steps=5)
turtle.end_fill()
畫一個半徑為50的綠色圓形
import turtle
turtle.color("green","green")
turtle.begin_fill()
turtle.circle(50)
turtle.end_fill()
函數調用及解釋語句
1、定位到坐標為(30,50)的位置
def flyTo():
turtle.penup()
turtle.goto(30, 50)
turtle.pendown()
#調用該函數
flyTo()
2、畫半徑為50的藍色圓
def circle():
turtle.color(“blue”,“blue”)
turtle.begin_fill()
turtle.circle(50)
turtle.end_fill()
#調用該函數
circle()
3、畫邊長為100的粉色正三角形
def triangle():
turtle.color(“pink”,“pink”)
turtle.begin_fill()
turtle.circle(100, 3)
turtle.end_fill()
#調用該函數
triangle()
4、畫長為30寬為90的紫色長方形
def rectangle():
turtle.color(“purple”,“purple”)
turtle.begin_fill()
turtle.fd(30)
turtle.left(90)
turtle.forward(90)
turtle.left(90)
turtle.forward(30)
turtle.left(90)
turtle.forward(90)
turtle.end_fill()
#調用該函數
rectangle()
附:

展開更多......

收起↑

資源預覽

<pre id="tfb94"><li id="tfb94"></li></pre>

<bdo id="tfb94"><rt id="tfb94"></rt></bdo>
  • <menu id="tfb94"><dl id="tfb94"></dl></menu><i id="tfb94"><acronym id="tfb94"><sub id="tfb94"></sub></acronym></i>

    1. 主站蜘蛛池模板: 西贡区| 信宜市| 昆山市| 舞钢市| 阿克陶县| 武义县| 永新县| 平原县| 诸城市| 大港区| 武威市| 义马市| 舒城县| 梁平县| 莆田市| 于都县| 仪陇县| 平凉市| 阳泉市| 三明市| 青州市| 延津县| 珲春市| 和顺县| 元江| 犍为县| 宝丰县| 阳城县| 城口县| 张北县| 织金县| 商都县| 南木林县| 陵川县| 遂川县| 梁平县| 云阳县| 方城县| 鱼台县| 黑河市| 五寨县|