23Gon using Turtle- Python

# -*- coding: utf-8 -*-
"""
Created on Fri Sep 16 00:28:29 2016

@author: Deepak
"""

#Program will draw 23-gon using turtle

import turtle

t = turtle.Pen()
num_sides= 23
side_length = 30
myangle = 360 / num_sides

for i in range(num_sides):
 t.forward(side_length)
 t.right(myangle)

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.