import turtle
wm = turtle.Screen()
t = turtle.Turtle()
t.penup()
t.goto(50,50)
t.pendown()
t.begin_fill()
t.color("brown")
t.forward(100)
t.left(72)
t.forward(100)
t.left(72)
t.forward(100)
t.left(72)
t.forward(100)
t.left(72)
t.forward(100)
t.end_fill()
I want to fill the pentagon with color, but the color of the line and arrow keep changing. How do I keep the lines and arrows black?
python turtle
import turtle
t = turtle.Turtle()
t.color('black', 'brown')
t.penup()
t.goto(50,50)
t.pendown()
t.begin_fill()
t.forward(100)
t.left(72)
t.forward(100)
t.left(72)
t.forward(100)
t.left(72)
t.forward(100)
t.left(72)
t.forward(100)
t.end_fill()
t.color('black', 'green')
t.penup()
t.goto(-50,-50)
t.pendown()
t.begin_fill()
t.forward(100)
t.right(144)
t.forward(100)
t.left(72)
t.forward(100)
t.right(144)
t.forward(100)
t.left(72)
t.forward(100)
t.right(144)
t.forward(100)
t.left(72)
t.forward(100)
t.right(144)
t.forward(100)
t.left(72)
t.forward(100)
t.right(144)
t.forward(100)
t.end_fill()
turtle.exitonclick()
© 2024 OneMinuteCode. All rights reserved.