To start to understand how to code we'll begin with a program that allows us draw with code called Turtle.
Below, see an example of how you would code a square.
So how would you code a triangle? Try it on your own. Look here if you get stumped.
How would you code a Star of David?
What could you do to code the star but use fewer lines of code?