import os import turtle os.chdir(r'D:\projects\wordpress\ex51') os.getcwd() def draw_square(some_turtle): for i in range (1,5): some_turtle.forward(200) some_turtle.right(90) def draw_art(): #Turtle Brad n=5 brad = turtle.Turtle() brad.speed(10) for i in range(1,int(360/n)+1): draw_square(brad) brad.right(n) draw_art() turtle.mainloop()
Recent Comments