import turtle
import math
import random
import os`
player = turtle.Turtle()
player.color("yellow")
player.shape("triangle")
player.penup()
player.speed(0)`
maxGoals = 10
goals = []
for count in range(maxGoals):
goals.append(turtle.Turtle())
goals[count].color("red")
goals[count].shape("circle")
goals[count].penup()
goals[count].speed(0)
goals[count].setposition(random.randint(-290,290),random.randint(-290,290))`
When run this code i am getting only the circle's outline in Red color
and the triangle's outline in Yellow color
I need the circle filled with red color
and the triangle filled with Blue color
. I have included the image below:
Kindly help me to fix this issue
This issue has come up several times on SO, but unfortunately, I can only locate one this morning: Turtle will not draw angled lines
The answer always seems to be that it's a graphics driver issue. Once corrected, things start working as expected. Sorry I can't be more specific but it depends on your system's setup.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.