Look up Sierpinski’s triangle. Write a recursive function with turtles to create Sierpinski’s triangle.
Note: Sierpinski’s triangle is very similar to the result of nestedTri. Additionally, trying to turn the turtle to begin with to set the triangle up “correctly” will lead the turtle getting slightly off.
```
def sierpinski():
earth = World(1000, 1000)
suzy = Turtle(earth)
nestedTri(suzy,250, 0)
def nestedTri(t, size, depth):
depth = depth+1
if depth >6:
return
for sides in range(3):
nestedTri(t,size/2.0, depth)
forward(t, int(size))
turn(t, 120)
```
You might also like to view...
In SharePoint, a(n) ________ provides no initial structure and can be defined for the specific purpose within the site
A) calendar app B) announcements app C) discussion board D) custom list
What is a good policy to have to protect corporate data stored on employee laptops?
A) Encrypt the hard drive. B) Require a login PIN. C) Connect through a VPN before storing data locally. D) Require a password of 8 characters or more.
In the Money app, you can regularly monitor any stock by clicking or tapping the Update button.
Answer the following statement true (T) or false (F)
Explain the benefits of using groupware.
What will be an ideal response?