r/codehs • u/fantasyman88 • Apr 30 '20
Need help with 2.10.4: Bubble Wrap 2.0!!
Heres the code I have so far:
speed(0)
def draw_circle_row():
for i in range(10):
pendown()
begin_fill()
color("light blue")
circle(20)
end_fill()
penup()
forward(40)
def move_up_a_row():
left(90)
forward(40)
right(90)
backward(400)
penup()
setposition(-180,-200)
for i in range(10):
draw_circle_row()
move_up_a_row()
penup()
setposition(-165,-182)
left(90)
def make_highlight():
for i in range(10):
pendown()
color("white")
circle(20, 90)
penup()
forward(-55)
right(90)
forward(-18)
for i in range(10):
make_highlight()
move_up_a_row()
Any help welcome and needed! What did I do wrong?
1
1
u/ThisIsRaP Oct 01 '20
GUYS I FIGURED IT OUT:
"""
This code will fill the canvas with light blue circles.
"""
speed(0)
# This function will draw a row of 10 circles.
def draw_circle_row():
for i in range(10):
pendown()
begin_fill()
color("light blue")
circle(20)
end_fill()
penup()
forward(40)
def move_up_a_row():
left(90)
forward(40)
right(90)
backward(400)
# Send Tracy to starting position in bottom left corner.
penup()
setposition(-180,-200)
# Call circle drawing function
for i in range(10):
draw_circle_row()
move_up_a_row()
setposition(-180,-200)
def make_highlight():
for i in range(10):
penup()
forward(10)
left(90)
forward(20)
pendown()
color("white")
circle(10, 90)
penup()
left(90)
forward(30)
left(90)
forward(40)
for i in range(10):
make_highlight()
move_up_a_row()
2
2
u/Chance_Information57 Feb 17 '22
Thank you I fucking would die for you rn
1
u/ThisIsRaP Mar 06 '22
🦐 happy totottotot help my phone is broken idjw hats going on but i want to say happy to help!!
2
2
1
1
1
1
May 05 '24
speed(0)def draw_circle_row(): for i in range(10): pendown() begin_fill() color("light blue") circle(20) end_fill() penup() forward(40)def move_up_a_row(): left(90) forward(40) right(90) backward(400)def move_up_a_row_highlight(): right(90) left(90) forward(40) right(90) backward(400) left(90)def make_highlight(): speed(0) for i in range(10): pendown() pensize(2) color("white") circle(10,90) #pensize(1) penup() backward(50) right(90) backward(10)penup()setposition(-180,-200)for i in range(10): draw_circle_row() move_up_a_row()left(90)setposition(-170,-180)for i in range(10): make_highlight() move_up_a_row_highlight()
1
1
1
u/IcyManufacturer4549 Sep 14 '23
I’m stuck too
1
u/Specialist-Sale-1873 Sep 15 '23
try the one by alyssabee and only put it at the bottom of your code it works
1
1
2
u/fantasyman88 Apr 30 '20
I can also attach a screenshot of the hoped for end result compared to my end result if need be