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

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. 主站蜘蛛池模板: 定南县| 通化市| 阳原县| 石首市| 洞头县| 墨竹工卡县| 清河县| 长葛市| 侯马市| 定西市| 广平县| 大荔县| 汶上县| 横山县| 贵溪市| 九寨沟县| 和林格尔县| 延安市| 靖安县| 益阳市| 裕民县| 元氏县| 浙江省| 靖江市| 正安县| 泰宁县| 江山市| 海林市| 镇沅| 米易县| 改则县| 潼南县| 仁化县| 来安县| 拉萨市| 自治县| 荔浦县| 亚东县| 榕江县| 邛崃市| 庆云县|