Explore
Courses
Batches
Sketches
Statistics
Code a Pookkalam
Jobs
Devsprint
People
Course Creation
Create a Course
Guidelines
Resources
Support
Blogs
My Profile
About Us
Login
The Joy of Programming
Getting Started
A gentle introduction to programming.
Hello, Joy!
Hello, Python!
Drawing Shapes
Write small programs to draw simple shapes.
Drawing Circles
Positioning Shapes
Rectangles and Ellipses
Lines and Polygons
Styles
Add colors and styles to the shapes.
Basic Styles
The Web Colors
Creating Colors
Combining Shapes
Combine two or more shapes to create new shapes.
Combining Two Shapes
Combining Many Shapes
Transformations
Apply transformations like translate, rotate and scale to create new shapes.
Translate
Rotate
Scale
Repeat
Composition
Composing new shapes by defining functions.
Functions
Functional Composition
Repetition & Variation
Create repetition and variation in sketches using loops and conditionals.
The For Loop
Repeating Shapes
Thinking in Loops
Making Grids
Conditional Expressions
Generating
Write programs that generate a new drawings everytime they are run.
Randomness
Generative Art
More Generative Art
Not Available for Preview
This lesson is not available for preview. Please join the course to access it.
All Courses
The Joy of Programming
Thinking in Loops
Thinking in Loops
Anand Chitipothu
Aug 3, 2021
There is no preview available for this lesson. Please join the course to access it. Click
here
to enroll.
Previous Lesson
Next Lesson
Ask a Question
×
Questions
JE
ANSWER FOR 7.8
Joswin Emmanuel
3 years ago
10
ANSWER FOR 7.8
JE
Joswin Emmanuel
3 years ago
Post
Dismiss
i=1 for x in [-125,-75,-25,25,75,125]: r=50 show(rectangle(x,0,r,r)) for j in range(1,i+1): show(rectangle(x,0,r*(j/i),r*(j/i))) i+=1
i=1 for x in [-125,-75,-25,25,75,125]: r=50 show(rectangle(x,0,r,r)) for j in range(1,i+1): show(rectangle(x,0,r*(j/i),r*(j/i))) i+=1
KL
Khadeeja lubaba
3 years ago
Post
Dismiss
Help with exercise 7.8
Help with exercise 7.8
DP
Dhanush P N
3 years ago
Post
Dismiss
##7.6 ```python def make_eye(width, index, count): n = index+1 return ellipse(w=width, h=width/2) + circle(r=width/4, fill='black') ```
##7.6 ```python def make_eye(width, index, count): n = index+1 return ellipse(w=width, h=width/2) + circle(r=width/4, fill='black') ```
DP
Dhanush P N
3 years ago
Post
Dismiss
##7.7 def make_redeye(width, index, count): n = index+1 red = 255*index/(count-1) fill = color(r=red, g=0, b=0) return ellipse(w=width, h=width/2) + circle(r=width/4, fill=fill, stroke='none'
##7.7 def make_redeye(width, index, count): n = index+1 red = 255*index/(count-1) fill = color(r=red, g=0, b=0) return ellipse(w=width, h=width/2) + circle(r=width/4, fill=fill, stroke='none'
DP
Dhanush P N
3 years ago
Post
Dismiss
##7.7 ```python def make_redeye(width, index, count): n = index+1 red = 255*index/(count-1) fill = color(r=red, g=0, b=0) return ellipse(w=width, h=width/2) + circle(r=width/4, fill=fill, stroke='none' ```
##7.7 ```python def make_redeye(width, index, count): n = index+1 red = 255*index/(count-1) fill = color(r=red, g=0, b=0) return ellipse(w=width, h=width/2) + circle(r=width/4, fill=fill, stroke='none' ```
DP
Dhanush P N
3 years ago
Post
Dismiss
##7.8 ```python def make_concentric_squares(width, index, count): n = index+1 shape = rectangle(w=width, h=width) for i in range(1, n): shape += rectangle(w=(width/n) * i , h=(width/n) * i) return shape ```
##7.8 ```python def make_concentric_squares(width, index, count): n = index+1 shape = rectangle(w=width, h=width) for i in range(1, n): shape += rectangle(w=(width/n) * i , h=(width/n) * i) return shape ```
DP
Dhanush P N
3 years ago
Post
Dismiss
##7.9 ```python def make_growing_circles(width, index, count): n = count - index return circle(r=width/(n+1)) ```
##7.9 ```python def make_growing_circles(width, index, count): n = count - index return circle(r=width/(n+1)) ```
ST
Shafeek T
3 years ago
Post
Dismiss
7.9 ?
7.9 ?
AE
Aiswarya Elizabeth
3 years ago
Post
Dismiss
7.9 please
7.9 please
FS
Farhan shabeer
3 years ago
Post
Dismiss
7.5
7.5
Want to discuss?
Post it here, our mentors will help you out.
Login