import turtle, random robot = turtle.Turtle() turtle.shape("turtle") turtle.speed(100) my_direction_fun = [turtle.forward, turtle.right, turtle.left, turtle.backward, turtle.circle, turtle.dot] my_color = ["red","blue","green","yellow","purple","orange"] while True: r= random.randint(0, 50) turtle.color(random.choice(my_color)) random.choice(my_direction_fun)(r) turtle.exitonclick()
Comments
One response to “2019.06.21(am): Random Drawing with python turtle”
-
I just want to tell you that I am newbie to weblog and definitely enjoyed your blog site. Very likely I’m likely to bookmark your blog . You actually have great article content. Thanks a bunch for sharing your blog.
Leave a Reply
You must be logged in to post a comment.