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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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