Operation Manual
A beginner’s guide to Scratch
77
Notes:Notes:
Going round in circles
Now you have filled the background, let’s add a circle to the surface.
>>> surface.ll(deepblue)
>>> position = (250,250)
>>> radius = 50
>>> linewidth = 2
>>> pygame.draw.circle(surface, mintcream, position, radius,
linewidth)
Update again to see the circle added.
>>> pygame.display.update()
Try changing some of the numbers for drawing the circle and see what happens.
Remember to update after each circle you add to the surface.
Notes:
Tip...
Sometimes, we
have more code
to write than fits
on one line. When
you see a line of
code such as the
last one here, that
goes onto a new
line without a
prompt or indent,
that is really just
one line of code.
Don’t press
Return to start a
new line, just let
it word wrap and
Python will work
it out for you.