129k views
5 votes
Add a function named circle to the polygons module. This function expects the same arguments as the square and hexagon functions. The function should draw a circle. (Hint: the loop iterates 360 times.)

User Bcr
by
3.9k points

1 Answer

6 votes

Answer and Explanation:

import Circle

#include<conio.h>

void main ()

int t , length , n

//for hexagon

def hexagon(t, length, n):

for _ in range(n):

t.fd(length)

t.lt(360 / n)

square = Circle.Circle()

square.penup()

square.sety(-270)

square.pendown()

hexagon(square, 30, 60)

User Dangling Cruze
by
4.9k points