My turtle

Euro flag like

 

Task: Build same as Euro flag


Code:

from turtle import *
import math 
bgcolor ('dark blue')
s=12
p=5
length=40
n=0
for i in range (s):
    n=n+(360 // s)
    penup()
    rad=math.radians(n)
    goto(250*math.sin(rad),250*math.cos(rad))
    pendown()
    color('gold')
    begin_fill()
    for i in range (p): 
        forward(length)
        angle = p // 2 * 360 / p
        left(angle)
    end_fill()
done()   

2026-07-08 21:41:53

Comments

No comments yet. Be the first to leave one!

Leave a Comment