Reputation: 303
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
Upvotes: 1
Views: 914
Reputation: 41872
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.
Upvotes: 1
Reputation: 177
I ran the code provided by you and it is working just fine. Please try the same code on the different machine and provide details so that if this is a system specific problem, I'll be able to help you if you provide moreinformation.
I ran it using a mac, python 2.7
joginder
Upvotes: 1