Introduction

For each challenge there will be a larger image of the challenge followed by a description. If hints are available, you can display any hints and tips by clicking on the arrow next to the description. Try not to use them unless you are truly stuck.

Challenges

Level 1

challenge 1

Challenge 1

Draw a square.

Creating a function for this one will help for future challenges.

challenge 2

Challenge 2

Draw a rectangle.

challenge 3

Challenge 3

Draw whatever this is. I wouldn't worry about a loop for this one.

challenge 4

Challenge 4

Draw this U shape. Try to keep the proportions correct.

challenge 5

Challenge 5

Draw a square inside a square. Make sure the center square is centered and one half the width of the larger square. This would be a good time to use your square function from Challenge 1.

challenge 6

Challenge 6

Two squares. Make sure the corner of the lower square is centered in the upper square. Another good use for the square function.

challenge 7

Challenge 7

Draw an equilateral triangle. This might be a good time to make your square function a triangle function. If you want, you could even make it a general purpose regular polygon function.

challenge 8

Challenge 8

Draw a regular pentagon. You probably know what to do by now.

challenge 9

Challenge 9

Draw a regular octagon. This time filled with a color of your choice.

challenge 10

Challenge 10

Draw a circle without using the circle() function. A general purpose regular polygon function would be helpful here.

challenge 11

Challenge 11

Draw a plus sign. All sides are of equal length.

challenge 12

Challenge 12

Draw this set of squares. Depending on how you decide to draw this one, you might be able to make good use of a function for a square.

challenge 13

Challenge 13

Draw this shape. Every side should be of equal length.

challenge 14

Challenge 14

Draw a star. This can be done similar to the regular polygons done in the previous challenges.

challenge 15

Challenge 15

Draw this set of rotated squares. Make sure they are lined up exactly. Although not necessary, the goto() function might be helpful.

  1. When drawing the first square start from the center and move to the middle of one side.
  2. You can then go back to the center of the first square, rotate and move to the middle of one side of the second square.

Level 2

challenge 1

Challenge 1

Draw a circle inside of a square or a square surrounding a circle. Make sure the circle fits perfectly inside of the square.

challenge 2

Challenge 2

Draw the boxes.

challenge 3

Challenge 3

Draw this star made up of triangles. How many triangles do you see? How many do you need to make the shape?

challenge 4

Challenge 4

Draw the fance rectangle loop thingy. To find the proportions, it can be helpful to trace the drawing by placing a piece of paper on the screen and tracing lightly with a pencil.

challenge 5

Challenge 5

Draw a square inside of a circle or a circle surrounding a square. How you approach the problem can sometimes make a huge difference.

  1. This can be drawn using only the circle() function.
challenge 6

Challenge 6

Same as Challenge 5, but add some color this time.

challenge 7

Challenge 7

Draw this shape made of rhombuses.

challenge 8

Challenge 8

Same as Challenge 8, but color every other rhombus.

  1. You may need to use the modulo operator and conditionals to help with the filling.
challenge 9

Challenge 9

Draw even more rhombuses with even more colors. The colors should alternate like they do in the example.

challenge 10

Challenge 10

Draw the beginnings of the yin-yang symbol. The circle() function will come in handy.

challenge 11

Challenge 11

Finish the yin-yang symbol.

challenge 12

Challenge 12

Draw the set of 10 circles all starting from the same location.

challenge 13

Challenge 13

The same as the previous challenge, but with every other circle filled.

challenge 14

Challenge 14

Similar to the last challenge, but now the circles have the same center.

challenge 15

Challenge 15

Draw this spiral.

challenge 16

Challenge 16

Draw this set of eight squares nested within each other.

Level 3

challenge 1

Challenge 1

Draw this circle surrounded by a square that is surrounded by a circle.

challenge 2

Challenge 2

The same as the previous challenge, but add some color this time.

challenge 3

Challenge 3

Draw this shape. I see rhombuses, or is it a hexagon with a star inside? Either way you've got this!

challenge 4

Challenge 4

Draw this grid of 100 squares.

challenge 5

Challenge 5

Draw the grid of nine circles with the center one colored. They should all be touching.

challenge 6

Challenge 6

Draw the outline of a link to a chain.

challenge 7

Challenge 7

See if you can get the links from Challenge 12 to fit together.

challenge 8

Challenge 8

Now see if you can put holes in the links for the pins to fit in and color the links.

challenge 9

Challenge 9

Draw the grid of 100 squares and color them lighter or darker based on which row they are in. You should aim for a nice gradual color gradient. It will be helpful to define your colors using rgb values instead of named colors. In Trinket, each color channel is represented by an integer from 0 to 255. In IDLE, by default, each color channel is represented by a float from 0 to 1. For example, in Trinket to set the pencolor to red you could use pencolor(255, 0, 0). This sets the red channel to the maximum red value, and the green and blue channels to 0.

challenge 10

Challenge 10

Draw the grid of 100 squares and color them lighther or darker depending on their distance from the lower left corner of the grid.

challenge 11

Challenge 11

You are drawing the grid of 100 squares, but as you go to draw each square there is a an equal probability that a square is either drawn or not drawn to the grid. Your grid will look different each time due to randomness unless you set the seed to a specific value.

challenge 12

Challenge 12

You are combining Challenge 9 and Challenge 11 for this one. You are randomly choosing which squares to draw and coloring them in based on which row they are in. There should be an equal chance of a square being drawn or not drawn.

challenge 13

Challenge 13

This one is just like Challenge 9, except you are adding some variation to the color on each row. You still want there to be an obvious gradient from dark to light.

challenge 14

Challenge 14

Draw the grid of 100 squares with a gradient from dark to light and randomly rotate each square up to 15 degrees clockwise or counterclockwise.

challenge 15

Challenge 15

Draw a random Hitomezashi pattern. Each row and column has an equal likelihood of starting or not starting with a dash. Each column or row will consist of alternating dashes and gaps. Randomly choose if each column starts with a dash or gap. For more information, check out this video about Hitomezashi Stitch Patterns at Numberphile.

challenge 16

Challenge 16

Draw a grid consisting of 100 slightly separated squares or circles. For each location in the grid there is a 25% chance of there being a circle instead of a square. Your drawing will look different each time unless you set a specific seed to be used.

challenge 17

Challenge 17

Create this scintillating grid illusion.

Level 4

challenge 1

Challenge 1

Send your turtle on a random walk. Have the turtle make a total of 400 steps. For each step the turtle should pick a random direction and travel forward 10 pixels.

challenge 2

Challenge 2

Draw 20 partial circles. Starting at the top of each circle, randomly choose to go right or left. Then randomly choose what fraction of the circle to draw.

challenge 3

Challenge 3

Draw 20 partial circles starting from a random location on the circle. Then randomly choose what fraction of the circle to draw.

challenge 4

Challenge 4

Draw 300 random circles inside of a square and color them based on their distance from the center of the square. In mine, the square has side lengths of 400 and each circle is colored red if it is less than 125 pixels from the center of the square.

challenge 5

Challenge 5

The Chaos Game. Start with three dots at each corner of an equilateral triangle. Then pick two of those dots and place a dot half-way between the two dots. Now take the new dot you just made and randomly pick one of the three original dots. Place a new dot half-way between those two dots. Keep doing this 10,000 times and you should get a Sierpinski triangle similar to mine. I started with an equilateral triangle with each side being 200 pixels. For more information, check out this video about the Chaos Game at Numberphile.

challenge 6

Challenge 6

Draw a grid of 100 squares with a gradient from dark to light and randomness increasing from the left to right.

challenge 7

Challenge 7

Create a 20 x 20 grid of small dots and 10 random larger dots. You will only place a small dot if the distance from the center of the large dot to the center of the small dot is greater than 1.5 times the diameter of the large dot. In this example the small dot is one quarter the diameter of the large dot, and the centers of the small dots are twice the diameter of the small dots apart.

challenge 8

Challenge 8

For this one I used 20 random locations for the dots. Choose any color combination you find pleasing.

challenge 9

Challenge 9

To make this drawing, randomly choose one of the cardinal directions and move forward. You should stay within the bounds of a square. If a move will take you outside of the square, you should not make the move. For my drawing I made 1000 moves, and the distance I moved forward each time was 5% the width of the square boundry.

Level 5

challenge 1

Challenge 1

Draw a Koch curve using an L-system (Lindenmayer system). See if you can understand the process well enough to draw it without looking at starter code. See this link for some more inspiration.

challenge 2

Challenge 2

Same as the previous challenge, but now you are going to draw a Koch Snowflake. You should only have to change the starting shape (axiom). The rule used will be the same as the Koch curve.

challenge 3

Challenge 3

Now just add some color.

challenge 4

Challenge 4

We are going to revisit the Sierpinski triangle. Draw it this time using an IFS (Iterated Function System). I used 10,000 iterations for the drawing. Once you get this one figured out, try some other cool ones.