For these challenges we will produce on screen artwork by randomly positioning confetti on different shapes of canvas. Our code will use Python Turtle to draw the canvas and the confetti.
Square Canvas
Check how the code provided below randomly positions each confetti within the boundaries of a square canvas:
Circular Canvas
Check how the code provided below randomly positions each confetti within the boundaries of a circular canvas:
Challenge #1: Ring Canvas
Adapt the code provided below to randomly position each confetti within the boundaries of a ring/doughnut shape:
Challenge #2: Diamond Canvas
Adapt the code provided below to randomly position each confetti within the boundaries of a diamond shape:
Challenge #3: Triangular Canvas
Adapt the code provided below to randomly position each confetti within the boundaries of an equilateral triangle:
Solution...
The solution for this challenge is available to full members!Find out how to become a member:
➤ Members' Area