Question: questions 9~14 Thank you! QUESTION 9 Call the following function to let turtle tess draw a heptagon (7 sides) of size 200. def drawPolygon(t, sz,
questions 9~14
Thank you!


QUESTION 9 Call the following function to let turtle tess draw a heptagon (7 sides) of size 200. def drawPolygon(t, sz, sides): "Make turtle t draw a polygon with given number of sides with sz as the side length. " for i in range(sides): t. forward(sz) t.left(360/sides) TTI Paragraph # Arial # 3 (12pt) #T THL ESS Path p QUESTION 10 Write statements to generate a random number between 1 and 10 (inclusive). TTT Paragraph # Arial # 3 (12pt) T.,. THL ESS Path p Words:o QUESTION 11 Consider the following Python code. Please create a drawPentagon function to draw a pentagon (5 sides) by using the drawPolygon function defined below. The drawPentagon function should take two parameters to receive a turtle and size. def drawPolygon(t, size, sides): Make turtle t draw a polygon with given number of sides with size as the side length. for i in range(sides): t. forward(size) t.left(360/sides)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
