python 繪圖加上文字


 
         

ArcGIS Pro學習加微信公眾號

 
         

我的微信公眾號

 


import
turtle t = turtle.Pen() turtle.bgcolor("black") my_name=turtle.textinput("輸入你的姓名","你的名字?") colors=["red","yellow","purple","blue"] for x in range(100): t.pencolor(colors[x%4]) t.penup() t.forward(x*4) t.pendown() t.write(my_name,font=("Arial",int((x+4)/4),"bold")) t.left(92)
#SquareSpiral1.py
import turtle
t = turtle.Pen()
turtle.bgcolor("black")
sides=6
colors=["red","yellow","green","blue","orange","purple"]
for x in range(360):
    t.pencolor(colors[x%sides])
    t.forward(x*3/sides+x)
    t.left(360/sides+1)
    t.width(x*sides/200)


print("####結束####")

#
# ————————————————
# 版權聲明:本文為CSDN博主「qq_14961401」的原創文章,遵循 CC 4.0 BY-SA 版權協議,轉載請附上原文出處鏈接及本聲明。
# 原文鏈接:https://blog.csdn.net/qq_14961401/article/details/58595783

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM