Sunday, January 29, 2023

Piece O' Cake

 Still have to declutter the code, which was the whole oint to begin with...

                                                             


rom turtle import TurtleScreen, RawTurtle
from tkinter import*

root = Tk()
root.geometry('600x700')
c = Canvas(root, height=320, width=300)
c.grid(column=0, row=0, sticky=N)
my_screen = TurtleScreen(c)
my_screen.bgcolor('pink')
my_screen.bgpic("AngelC(1).gif")

c1 = Canvas(root, height=320, width=300)
c1.grid(column=0, row=0, sticky=S)
my_screen1 = TurtleScreen(c1)
my_screen1.bgcolor('orange')
my_screen1.bgpic("MadeIt.gif")

c2 = Canvas(root, height=600, width=300)
c2.grid(column=1, row=0, sticky = N)

my_screen2 = TurtleScreen(c2)
my_screen2.bgcolor('khaki')
my_screen2.bgpic("Arecette.gif")

c3 = Canvas(root, height=50, width=300)
c3.grid(column=1, row=0, sticky = S)
my_screen3 = TurtleScreen(c3)
my_screen3.bgcolor('sky blue')


class Squares(RawTurtle):
def _init_(self):
super().init(self)

t1 = Squares(my_screen, 'turtle')
t1.width(3)
t1.pu()
t1.goto(-140,120)
t1.pd()
t1.pencolor('red')
t1.fillcolor('green')
t1.write("ANGELFOOD CAKE", font=("Verdana",
15, "normal"))

t2 = Squares(my_screen, 'square')
t2.width(3)
t2.color('green')
t2.pencolor('red')
t2.pensize(2)
t2.pu()
t2.goto(-150,-100)
t2.pd()
t2.forward(290)

t3 = Squares(my_screen1, 'turtle')
t3.width(3)
t3.pu()
t3.goto(-140,130)
t3.pd()
t3.pencolor('brown')
t3.fillcolor('green')
t3.write("MADE IT", font=("Verdana",
15, "normal"))

t4 = Squares(my_screen1, 'triangle')
t4.width(3)
t4.color('teal')
t4.pencolor('brown')
t4.pensize(2)
t4.pu()
t4.goto(-150,-130)
t4.pd()
t4.forward(287)
t5 = Squares(my_screen3, 'turtle')
t5.width(3)
t5.color('coral')
t5.pencolor('brown')
t5.pensize(2)
t5.pu()
t5.goto(-150,-10)
t5.write('3/4 cups flour; .4 cups cornstarch; \n 5 eggs; 2/3 cups sugar, lemon peel', font=("Verdana",
8, "normal"))

t5.forward(287)
root.mainloop()


No comments: