91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 1.13KB
    文件類型: .py
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-01-30
  • 語(yǔ)言: Python
  • 標(biāo)簽: python??

資源簡(jiǎn)介

用python繪制出七巧板

資源截圖

代碼片段和文件信息

from?math?import?sqrt
from?turtle?import?*
#?繪制三角形函數(shù)
def?triangle(a?col):
????begin_fill()
????for?i?in?range(1):
????????fd(a)
????????rt(135)
????????fd(a?*?sqrt(2))
????????rt(135)
????????fd(a)
????fillcolor(col)
????end_fill()
????rt(180)
#?繪制正方形函數(shù)
def?square(b?col):
????begin_fill()
????for?i?in?range(4):
????????fd(b)
????????rt(90)
????fillcolor(col)
????end_fill()
????rt(180)
#?繪制菱形函數(shù)
def?diamond(c?col):
????begin_fill()
????for?i?in?range(2):
????????fd(c)
????

評(píng)論

共有 條評(píng)論

相關(guān)資源