Courses
Sketches
Code a Pookkalam
Grants
Support
About
Login
Sketches
0
New Sketch
By
Ananya R
Run
def concentric_rectangle(x, y, r, n): step = r/n for i in range(n): c = rectangle(x=x, y=y, w=r, h=r) show(c) r = r-step w, h = 200, 200 r = 200 n = 10 concentric_rectangle(0, 0, r, n) concentric_rectangle(w/2, w/2, r/2, 5) concentric_rectangle(-w/2, -w/2, r/2, 5) concentric_rectangle(w/2, -w/2, r/2, 5) concentric_rectangle(-w/2, w/2, r/2, 5)
New Comment
×
Comments
Want to discuss?
Post it here, our mentors will help you out.
Login