Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """choose the number of sides and see the shape being drawn"""
- from turtle import *
- from turtle import *
- myshape = Turtle()
- def drawshape(T_name, No_of_sides):
- degrees = (360/No_of_sides)
- hideturtle()
- pensize(10)
- color("blue")
- length = 100
- count = 0
- while count < No_of_sides:
- begin_fill()
- forward(length)
- right(degrees)
- HowMaySides = int(input('How many sides does the shape have?'))
- drawshape(myshape,HowMaySides)
Advertisement
Add Comment
Please, Sign In to add comment