Multiple Choice
Case Study 2:
def sierpinski(myTurtle, p1, p2, p3, depth) :
if depth > 0:
sierpinski(myTurtle, p1,
midPoint(p1, p2) , midPoint(p1, p3) , depth - 1)
sierpinski(myTurtle, p2,
midPoint(p2, p3) , midPoint(p2, p1) , depth - 1)
sierpinski(myTurtle, p3,
midPoint(p3, p1) , midPoint(p3, p2) , depth - 1) else:
drawTriangle(myTurtle, p1, p2, p3)
-Refer to the session in the accompanying Case Study 2. Which of the following lines correctly implements the midPoint function: def midPoint(p1, p2) ?
A) return ((p1[0] + p2[0]) /2.0, (p1[1] + p2[1]) /2.0)
B) return ((p1[1] + p2[1]) /2.0, (p1[1] + p2[1]) /2.0)
C) return ((p1[0] + p2[0]) /3.0, (p1[1] + p2[1]) /3.0)
D) return ((p1 + p2[0]) /2.0, (p1 + p2[1]) /2.0)
Correct Answer:

Verified
Correct Answer:
Verified
Q23: A fractal is similar to itself at
Q24: Case Study 2:<br>def sierpinski(myTurtle, p1, p2, p3,
Q25: Case Study 3:<br>Axiom A<br>Rules A → B<br>B
Q26: Case Study 1:<br>1. def drawSquare(aTurtle, side):<br>2. for
Q27: Case Study 3:<br>Axiom A<br>Rules A → B<br>B
Q28: Describe the purpose of the recursive step
Q30: How many recursive steps are used to
Q31: Case Study 4:<br>1. Draw a trunk that
Q32: Case Study 1:<br>1. def drawSquare(aTurtle, side):<br>2. for
Q33: Match each definition with its phrase.<br>-Formal mathematical