The Joy of Programming
Making Grids
There is no preview available for this lesson. Please join the course to access it. Click here to enroll.
Questions
solution for 7.11
JE Joswin Emmanuel
3 years ago
Post
Dismiss
coord=[-125,-75,-25,25,75,125] r=25 for i in coord: m=1 for j in coord: for n in range(1,m+1): show(circle(i,j,r*(n/m))) m+=1
coord=[-125,-75,-25,25,75,125] r=25 for i in coord: m=1 for j in coord: for n in range(1,m+1): show(circle(i,j,r*(n/m))) m+=1
Want to discuss?
Post it here, our mentors will help you out.
Simple solution for 7.10
JE Joswin Emmanuel
3 years ago
Post
Dismiss
coord=[-125,-75,-25,25,75,125] for i in coord: for j in coord: show(ellipse(i,j,50,25)+ellipse(i,j,25,50))
coord=[-125,-75,-25,25,75,125] for i in coord: for j in coord: show(ellipse(i,j,50,25)+ellipse(i,j,25,50))
DP Dhanush P N
3 years ago
Post
Dismiss
##7.10 ```python def make_shape(width): shape = ellipse(w=width,h=width/2) return shape + (shape | rotate(90)) ```
##7.10 ```python def make_shape(width): shape = ellipse(w=width,h=width/2) return shape + (shape | rotate(90)) ```
DP Dhanush P N
3 years ago
Post
Dismiss
##7.11 ```python def make_shape(width, row, column, grid_size): n = grid_size-row return concentric_circles(r=width/2, n=n) ```
##7.11 ```python def make_shape(width, row, column, grid_size): n = grid_size-row return concentric_circles(r=width/2, n=n) ```
DP Dhanush P N
3 years ago
Post
Dismiss
##7.12 ```python def make_shape(width, row, column, grid_size): n = grid_size - max(row, column) return concentric_circles(r=width/2, n=n) ```
##7.12 ```python def make_shape(width, row, column, grid_size): n = grid_size - max(row, column) return concentric_circles(r=width/2, n=n) ```
Want to discuss?
Post it here, our mentors will help you out.