Skip to content

Commit 26fe7b7

Browse files
authored
Ps ccw (#181)
1 parent aff1d2a commit 26fe7b7

File tree

3 files changed

+9
-148
lines changed

3 files changed

+9
-148
lines changed

lib/tasks/project_components/target_practice_example/main.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@
44

55
# The mouse_pressed function goes here
66
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
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
1717
def 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

lib/tasks/project_components/target_practice_example/p5.py

Lines changed: 0 additions & 139 deletions
This file was deleted.

lib/tasks/project_components/target_practice_starter/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88

99
def setup():
1010
# Setup your game here
11-
size(400, 400) # width and height
11+
size(400, 400) # width and height of screen
1212

1313
def draw():
1414
# Things to do in every frame
15-
fill('cyan')
16-
rect(0, 0, 400, 250) # Sky
15+
fill('cyan') # Set the fill color for the sky to cyan
16+
rect(0, 0, 400, 250) # Draw a rectangle for the sky with these values for x, y, width, height
1717

1818
# Keep this to run your code
1919
run(frame_rate=2)

0 commit comments

Comments
 (0)