4
4
5
5
# The mouse_pressed function goes here
6
6
def 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
8
8
print ('You hit the outer circle, 50 points!' )
9
- elif hit_color == Color ('red' ):
9
+ elif hit_colour == Color ('red' ):
10
10
print ('You hit the inner circle, 200 points!' )
11
- elif hit_color == Color ('yellow' ):
11
+ elif hit_colour == Color ('yellow' ):
12
12
print ('You hit the middle, 500 points!' )
13
13
else :
14
14
print ('You missed! No points!' )
15
15
16
16
# The shoot_arrow function goes here
17
17
def shoot_arrow ():
18
- global hit_color # Can be used in other functions
18
+ global hit_colour # Can be used in other functions
19
19
arrow_x = randint (100 , 300 ) # Store a random number between 100 and 300
20
20
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
22
22
fill ('sienna' ) # Set the arrow to fill colour to brown
23
23
circle (arrow_x , arrow_y , 15 ) # Draw a small circle at random coordinates
24
24
@@ -40,7 +40,7 @@ def draw():
40
40
fill ('red' )
41
41
circle (200 , 200 , 110 ) # Inner circle
42
42
fill ('yellow' )
43
- circle (200 , 200 , 30 ) # Middle
43
+ circle (200 , 200 , 30 ) # Middle circle
44
44
shoot_arrow ()
45
45
46
46
# Keep this to run your code
0 commit comments