import turtle laki = turtle.Turtle() laki.shape('turtle') laki.speed() def r(sides): if sides == 1 or sides == 2 or sides == 0: print ("There isn't any regular shapes with this number of sides") else : for r in range(0, sides): laki.speed(sides) angle = (360 / sides) laki.forward(angle) laki.left(angle) print('every angle was ' + str((angle))) a = input('how many sides do you want ?') r(int(a))
اجرا کن
پاک کن