Question: Answer must be in Python 3 Answer: import turtle def equiTri(t, size): for side in range(3): t.forward(size) t.left(120) def bumps(t, num, init, delta): for triangles

 Answer must be in Python 3 Answer: import turtle def equiTri(t,

Answer must be in Python 3

Answer:

import turtle

def equiTri(t, size): for side in range(3): t.forward(size) t.left(120)

def bumps(t, num, init, delta): for triangles in range(num): equiTri(t,init) t.forward(init) init += delta s = turtle.Screen() t = turtle.Turtle() t.left(15) bumps(t, 3, 40, 20)

Question lla (8 points) Write a function named equiTri) that uses turtle graphics to draw an equilateral triangle of specified side length. The function equiTri() takes two parameters i. t, a turtle that is used for drawing ii. size, the length of a side of the triangle The function equiTri() should draw a triangle beginning at the initial position and orientation of t, and should leave t with the same position and orientation on exit. Do not make any assumptions about the initial state of the turtle. For full credit you must use a loop for repeated operations. Question 11b (12 points) Write a function named bumps() that uses turtle graphics and the function equiTri) to draw a series of equilateral triangles (bumps) of increasing size. The triangles have a common baseline and each triangle touches the following triangle at a single point. Begin drawing at the initial location of the turtle The function bumps() should repeatedly call equiTri) to draw the triangles. The function bumps() takes 4 parameters i. t, a turtle used for drawing ii. num, the number of triangles to draw iii. init, the length of a side of the first triangle iv. delta, the increase in side length of successive triangles For example if bumps) is called by the following code, the drawing below would be correct output. import turtle s - turtle.Screen() t-turtle.Turtle) t.left (15) bumps (t, 3, 40, 20)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!