Python Forum
Turtle Star Fill Color Yellow-White Interchanging Color Effect
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Turtle Star Fill Color Yellow-White Interchanging Color Effect
#6
This needs some extra tweaking, but it goes some way towards the desired effect.
Paul

from turtle import *
import turtle
turtle.speed(8)
turtle.setpos(0,0)
color("red", "yellow")
begin_fill()
 
while True:
    forward(400)
    left(170)
    if abs(pos()) < 1:
        break
end_fill()

color("red","white")
turtle.setpos(100,10)
begin_fill()
counter = 0
while True:
    counter += 1
    forward(200)
    left(170)
    if counter == 18:
        break
    
end_fill()
hideturtle()
done()
It is more important to do the right thing, than to do the thing right.(P.Drucker)
Better is the enemy of good. (Montesquieu) = French version for 'kiss'.
Reply


Messages In This Thread
RE: Turtle Star Fill Color Yellow-White Interchanging Color Effect - by DPaul - Oct-24-2023, 05:15 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Bug Copying methods to effect the new owner instead of the old instance Daniel285 0 53 10 hours ago
Last Post: Daniel285
  identify not white pixels in bmp flash77 17 2,840 Nov-10-2023, 09:21 PM
Last Post: flash77
  Color a table cell based on specific text Creepy 11 2,310 Jul-27-2023, 02:48 PM
Last Post: deanhystad
  Pixel color and action Sartre 4 2,268 Apr-13-2023, 03:26 AM
Last Post: Sartre
  Printing effect sizes for variables in an anova eyavuz21 2 1,065 Feb-01-2023, 02:12 PM
Last Post: eyavuz21
  color code doesn't work harryvl 1 988 Dec-29-2022, 08:59 PM
Last Post: deanhystad
  color names jimrinaldo 8 160,160 Sep-12-2022, 02:53 PM
Last Post: motorland
  How to sort .csv file test log which item first fail and paint color SamLiu 24 5,382 Sep-03-2022, 07:32 AM
Last Post: Pedroski55
  simplekml change shape&color issac_n 2 2,957 Aug-20-2022, 07:15 PM
Last Post: Joseph_Paintsil
  color column in mail html df bnadir55 0 767 Aug-14-2022, 07:11 AM
Last Post: bnadir55

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020