Fun with Flags – Part 2: more flags

Step 7 – Flags with triangles on

Flag of SudanLet's draw the flag of Sudan.

This is a normal three striped flag, like Lithuania from Step 1. With a triangle added in at the end.

The tricky bit is getting the triangle drawn right.

Sudan is a country in north-east Africa, just south of Egypt. It split into two in 2011 after a civil war that lasted more than 20 years. South Sudan, the new country that was created, has a very similar flag with a star on the triangle.

  1. Write code to draw the three stripes like you did for the Lithuanian flag (see Step 1)

    Use the colour codes above. Don't forget, our standard flag is 180 steps wide and 120 steps tall

  2. Run your code to test it out
  3. Look really carefully at where the turtle ends up and which direction it's pointing in

    Ideally you want the turtle in the bottom left corner pointing upwards

  4. Get the turtle in the right position and facing the right way
  5. Add the code to draw the triangle

    This bit's tricky...

  6. Run your code to test it out
  7. Make any changes until you get it right – use the code below if you get stuck

If you got that right first time then well done! I didn't!!

If you compare your flag with the one at the top of this page, you'll notice that the actual flag of Sudan is a bit wider than your one probably is. That sometimes happens with flags. You'd just need to make the width a bit more (try 240 steps).