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

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. 主站蜘蛛池模板: 厦门市| 平遥县| 望都县| 博乐市| 京山县| 平乡县| 江陵县| 临朐县| 诸暨市| 南投市| 大厂| 什邡市| 海阳市| 新巴尔虎左旗| 特克斯县| 巧家县| 抚远县| 冷水江市| 清河县| 哈尔滨市| 广水市| 汉源县| 镇安县| 盘山县| 界首市| 扬中市| 安徽省| 客服| 沙河市| 广南县| 利川市| 富阳市| 遂川县| 星座| 黔西县| 饶河县| 阳山县| 新津县| 汶川县| 会东县| 广南县|