[Tutor] Python Turtle Question

Nutthanai Chowwiwat chowwiwa at stolaf.edu
Fri Sep 12 03:42:09 CEST 2014


Hello, I am fairly new to python programming and I have been stuck on this
question for atleast an hour now and have been trying to find some
information on how to do it online.

The question to thep problem is:

*Write a program that asks the user for the number of sides, the length of
the side, the color, and the fill color of a regular polygon. The program
should draw the polygon and then fill it in.*

This is what I have so far. I am only just starting out. So if possbile I
want to stick to the basics. I'm pretty sure I need to use a "for loop".

Thanks!

----------------------------------------------------------------

def main():


    import turtle

    wn = turtle.Screen()

    tess = turtle.Turtle()


    #Ask for information to draw

    num_sides = eval(input("How many sides does your shape have?"))

    length_sides = eval(input("How long are the sides?"))

    shape_color = eval(input("What color is your shape"))


main()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140911/f5b3939a/attachment.html>


More information about the Tutor mailing list