python中使用turtle庫繪制一個紅色五角星
以下是代碼運行結果: ...
以下是代碼運行結果: ...
from turtle import * color("black","red") begin_fill() pu() fd(-200) pd() seth(30) fd(300) seth(-90) fd(300) seth(150) fd(300) end_fill() pu ...
import turtle turtle.left(30)turtle.forward(144) turtle.right(60)turtle.forward(144) turtle.right(60)turtle.forward(144 ...
六角形的繪制 描述 使用turtle庫繪制一個六角形,效果如下: ...
只好這樣霸王硬上弓了,不知道有沒有更好的辦法,但沒搜到還VIP付費。。。。 然后遇到了八角形的繪制,卻想不出兩者有何異曲同工之妙。 但在確定循環左轉角度的時候,愣了一下,哈哈哈哈,看來我初中數學還需要回爐重造 其實這樣看就豁然開朗: 轉向2次,就從絕對角 ...