The travails of Turtle: Still trying for a generic Valentine's message.
import turtle
import random
screen = turtle.Screen()
screen.setup(width=680, height=680)
screen.bgcolor("midnightblue")
image = "Choco.gif"
screen.bgpic(image)
my_t = turtle.Turtle()
my_t.hideturtle()
my_t.speed(1)
col = ["white", "aquamarine", "yellow"]
my_t.pencolor(random.choice(col))
my_x = [-270,-100]
my_y = [200, 225]
my_t.pu()
my_t.setpos(random.choice(my_x), random.choice(my_y))
my_t.pd()
siz = [18, 22, 26]
look = ["bold", "italic", " "]
my_t.write("SWEETS for my Sweetie...", font = ("Times_Nr", random.choice(siz), random.choice(look)))
my_t2 = turtle.Turtle()
my_t2.color('orange', 'khaki')
my_t2.shape('turtle')
my_t2.pensize(3)
my_t2.hideturtle()
my_t2.pu()
my_t2.goto(-250, 300)
my_t2.showturtle()
my_t2.pendown()
my_t2.forward(500)
screen.mainloop()
No comments:
Post a Comment