Question: python Problem 5 Recall from Problem 4 that a 5-pointed star was drawn. We can observe that the base of the pointed staria pentagon and
Problem 5 Recall from Problem 4 that a 5-pointed star was drawn. We can observe that the base of the pointed staria pentagon and that each point of the star can be viewed as an isosceles triangle in which the base of the triangle is one of the sides of the pentagon. 1. Redraw the 5 pointed star without any lines that run through the middle. First, you can try accomplishing this by manipulating turtle's pen. Recall that turtle.penup stops the turtle from drawing a line and turtle.pendown0 returns the turtle to drawing a line. In order to figure out how far the turtle should go before lifting the pen, you will need to calculate the length of the sides of the isosceles triangle that forms the point of the star. We need to know the length of one of the sides of the triangle in order to do this. Let's consider the pentagon that we drew in Problem 4 because we know the length of its sides. We can consider that the base of the sosceles triangle will be the length of one of the sides of our original pentagon. We have already calculated the base angles of the isosceles triangle so we can use the cosine function to find the length of the remaining sides of the triangle length of side - length of base 2 cos(base angle) Use the math.cos function from the math module. First you will need to convert degrees to radiana because the math.cos function uses radians. Use the math.radiana function to perform the conversion 2. Now, let's consider how we can use the turtle to draw the pointed star without internal lines and without having to pick up the pen. Instead, the turtle will make a turn after it draws one side of the isosceles triangle. Using this method, the turtle will make 10 turns instead of turns as it draws the outline of the star. Find the degree that the turtle should turn for these additional turns and draw the
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
