I have created the outline of my drawing project. The first part is to create the different types of functions needed to create the ghost. You will notice I created a lot of functions that describe each component needed to create the ghost and the text bubble. I have return commands to make sure the functions work and draw. They all work which is great! I will now move forward to combine the functions in order to create the ghost and text bubble. I did get stuck with some of the commands. I have forgotten some of them so I went to turtle website to refer back to the different commands needed such as the fill shape one and the goto command. I got to this website through a link you have hyperlinked. I honestly just went to to the website when I got stuck. If an error came I read the error and if I could not figure it out on my own I would look it up on google to see what it meant. I have began to look at the animations as well. I looked at some of them more last week that today but I will continue to look at more of them today.

This commit is contained in:
erbrown
2025-10-13 12:25:59 -04:00
parent 1b593cebf8
commit e3936124f4
4 changed files with 87 additions and 6 deletions

View File

@@ -5,3 +5,59 @@
# (Briefly describe what this program does.)
from turtle import *
def draw_circle(radius, color):
fillcolor(color)
begin_fill()
circle(radius)
end_fill()
draw_circle(50, "medium purple")
def half_circle(radius, color):
fillcolor(color)
begin_fill()
circle(radius, 180)
end_fill()
half_circle(100, "medium purple")
def draw_eye(x,y,radius,color):
penup()
goto(x,y)
pendown()
fillcolor(color)
begin_fill()
circle(radius)
end_fill()
draw_eye(100,0,20, "black")
def text_bubble(x,y, width, height, color):
penup()
goto(x,y)
pendown()
fillcolor(color)
begin_fill()
for i in range(2):
circle(height/2,90)
forward(height)
circle(height/2,90)
forward(width)
end_fill()
text_bubble(100,150, 40, 60, "orange")
def text(x, y, message, text_color,size):
penup()
goto(x,y)
pendown()
color(text_color)
write(message,size)
text(160, 160, "BOO!", "black", 30)
input()