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

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. 主站蜘蛛池模板: 博兴县| 海林市| 仙居县| 蒲江县| 沁水县| 金乡县| 正定县| 石柱| 巍山| 元阳县| 中牟县| 延长县| 沈丘县| 湾仔区| 南阳市| 依安县| 英山县| 察隅县| 大港区| 铜陵市| 平度市| 民权县| 潜江市| 九龙坡区| 新乐市| 合江县| 桃园市| 巧家县| 孝感市| 将乐县| 阜城县| 苏尼特左旗| 师宗县| 南雄市| 股票| 突泉县| 清丰县| 板桥市| 沙河市| 镇坪县| 清涧县|