Draw circles or geometric figures in the turtle library in Python

Draw circles or geometric figures in the turtle library in Python

import turtle as t#Give the turtle library an alias of t
t.circle(100)
#Draw radius t.done()#Keep window = turtle.done()
Insert picture description here

Multi-circle:
import turtle as t#Give the turtle library a nickname of t
for i in range(12):#Use a for loop to traverse
t.right(95)
#Turn the brush to the right t.circle(100)#Draw a radius
t. done()#Keep the window = turtle.done()
Insert picture description here

Almost just add a for loop

Guess you like

Origin blog.csdn.net/qq_44948696/article/details/108458334