One eye would make it simpler ...
from graphics import *
def drawCircle(win, centre, radius, colour):
circle = Circle(centre, radius)
circle.setFill(colour)
circle.setWidth(2)
circle.draw(win)
def drawTarget():
w = 250
h = 250
win = GraphWin("One Spooky Eye", w, h)
# center should be at 1/2 width and height
centre = Point(w//2, h//2)
drawCircle(win, centre, 40, "white")
drawCircle(win, centre, 20, "blue")
drawCircle(win, centre, 10, "black")
# click mouse to go on
win.getMouse()
win.close()
drawTarget()
You can streamline the whole thing a little more using a for loop ...
# draw one spooky eye in the center of the drawing window
# calculate the center from width, height
from graphics import *
def drawCircle(win, centre, radius, colour):
circle = Circle(centre, radius)
circle.setFill(colour)
circle.setWidth(2)
circle.draw(win)
def drawTarget():
w = h = 250
win = GraphWin("One Spooky Eye", w, h)
# center should be at 1/2 width and height
centre = Point(w//2, h//2)
for radius, color in ((40,"white"), (20,"blue"), (10,"black")):
drawCircle(win, centre, radius, color)
# click mouse to go on
win.getMouse()
win.close()
drawTarget()
Stop before the code gets too cryptic and hard to read and understand.