Files
project_drawing/drawing.py
angelotr eaf4735298 My second commit will consist of my second round of changes. What has changed is my functions in drawing.py and shapes.py have been updated to show a house and sun. My idea for the project proposal has also changed, only a minor change.
What got me stuck in the beginning is figuring out where to begin. It was an easy fix because I used the previous assignments to help me with making shapes using
various parameters. I figured out that the previous lessons still prove to be a great help to look back at when stuck. I was specifically stuck with the animation
of the sun rising. A different method was used to create a rising sun but was outside of the realm of super turtle which ultimately had me back track.
It took longer to try and learn animation with super turtle so I reached out to my professor and decided I will continue with my house but the sun will be
stationary rather than rising. Something I want to learn more about is animating using super turtle. An idea for a future project will be to create a house
and a rising sun using the tools of super turtle.
2025-10-05 02:06:34 -04:00

61 lines
1.2 KiB
Python

# drawing.py
# ----------
# By ____(you)___________
#
# (Briefly describe what this program does.)
import turtle
from shapes import draw_square, draw_triangle, draw_rectangle, draw_circle
# setup
screen = turtle.Screen()
screen.setup(width=800, height=600)
screen.bgcolor("skyblue")
pen = turtle.Turtle()
pen.speed(0)
pen.hideturtle()
# draw house
def draw_house():
# house base
pen.penup()
pen.goto(-100, -200)
pen.pendown()
draw_square(pen, 200, color="black", fill="lightgrey")
# roof (lowered)
pen.penup()
pen.goto(-100, -200)
pen.pendown()
draw_triangle(pen, 200, color="black", fill="brown")
# door
pen.penup()
pen.goto(-30, -200)
pen.pendown()
draw_rectangle(pen, 60, 100, color="black", fill="darkred")
# windows (lowered)
pen.penup()
pen.goto(-80, -210)
pen.pendown()
draw_square(pen, 40, color="black", fill="lightblue")
pen.penup()
pen.goto(40, -210)
pen.pendown()
draw_square(pen, 40, color="black", fill="lightblue")
# draw sun (stationary)
def draw_sun():
pen.penup()
pen.goto(250, 180) # top-right corner
pen.pendown()
draw_circle(pen, 50, color="black", fill="yellow")
# main
draw_house()
draw_sun()
turtle.done()