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

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. 主站蜘蛛池模板: 开封市| 秀山| 突泉县| 岳池县| 阜南县| 乌拉特后旗| 绥德县| 久治县| 哈巴河县| 黎川县| 碌曲县| 信丰县| 青河县| 萝北县| 大姚县| 盱眙县| 平舆县| 和政县| 乌兰浩特市| 元谋县| 焦作市| 丹寨县| 高台县| 疏附县| 新竹县| 淳化县| 贵阳市| 甘谷县| 朝阳县| 贡觉县| 兴业县| 呼和浩特市| 临夏县| 崇明县| 温宿县| 涞水县| 随州市| 柳江县| 白朗县| 黔西县| 蒲江县|