33% found this document useful (3 votes)
5K views1 page

Bubble Wrap 2.0 CodeHS

Uploaded by

oliver261
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
33% found this document useful (3 votes)
5K views1 page

Bubble Wrap 2.0 CodeHS

Uploaded by

oliver261
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

!.?42#' @A%!(*-+#?

+ # $ BC% %

! ! %!-.-/,0%1#-%!/23+--(4 !"#$"%&'())*+&,-./&!"$ 0()123&4&567327(+ 0.8+ F(3/(3 E+?3G5.?+? A6<? B??2H71+73 I-.>+ J6-+

1.27"/9 :(7 5*+.- 5;+<=&56>+


" 24 for i in range(10):
25 pendown()
:+?(*3&,6-*> 26 begin_fill()
27 color("light blue")
28 circle(20)
29 end_fill()
30 penup()
31 forward(40)
32
33 """
34 This function will move Tracy from end of
35 row up to beginning of the row on top
36 """
37 def move_up_a_row():
!"#$%&'()*+,( 38 left(90)
39 forward(40)
40 right(90)
41 backward(400)
@(2<=&A6<? 42 """
43 Send Tracy to starting position in bottom
B>8.7<+>&<2-<*+ 44 left corner
45 """
/.-.1+3+-?&<.7
46 penup()
;+*/&96(&>-.C 47 setposition(-180,-200)
?1.**+-&/6-3267? 48 """
49 Call circle drawing function 10 times to
27?3+.>&6D&.&D(** 50 fill ten rows
<2-<*+" 51 """
52 for i in range(10):
E-.<9&>-.C?&.&D(**
53 draw_circle_row()
<2-<*+&D-61&3;+ 54 move_up_a_row()

$ # " K73-6>(<3267&36&L-6H-.1127H&C23;&E(-3*+&I-./;2<? " 567 565 568 569 56: 56; 56< 56= 56> !

You might also like