44
55# The mouse_pressed function goes here
66def mouse_pressed ():
7- if hit_color == Color ('blue' ): # Like functions, 'if' statements are indented
7+ if hit_colour == Color ('blue' ): # Like functions, 'if' statements are indented
88 print ('You hit the outer circle, 50 points!' )
9- elif hit_color == Color ('red' ):
9+ elif hit_colour == Color ('red' ):
1010 print ('You hit the inner circle, 200 points!' )
11- elif hit_color == Color ('yellow' ):
11+ elif hit_colour == Color ('yellow' ):
1212 print ('You hit the middle, 500 points!' )
1313 else :
1414 print ('You missed! No points!' )
1515
1616# The shoot_arrow function goes here
1717def shoot_arrow ():
18- global hit_color # Can be used in other functions
18+ global hit_colour # Can be used in other functions
1919 arrow_x = randint (100 , 300 ) # Store a random number between 100 and 300
2020 arrow_y = randint (100 , 300 ) # Store a random number between 100 and 300
21- hit_color = get (arrow_x , arrow_y ) # Get the hit colour
21+ hit_colour = get (arrow_x , arrow_y ) # Get the hit colour
2222 fill ('sienna' ) # Set the arrow to fill colour to brown
2323 circle (arrow_x , arrow_y , 15 ) # Draw a small circle at random coordinates
2424
@@ -40,7 +40,7 @@ def draw():
4040 fill ('red' )
4141 circle (200 , 200 , 110 ) # Inner circle
4242 fill ('yellow' )
43- circle (200 , 200 , 30 ) # Middle
43+ circle (200 , 200 , 30 ) # Middle circle
4444 shoot_arrow ()
4545
4646# Keep this to run your code
0 commit comments