From 11c107df6d18857424ee02cddc2177af4e9e0fe0 Mon Sep 17 00:00:00 2001 From: jwberent Date: Fri, 26 Sep 2025 21:07:44 -0400 Subject: [PATCH] I changed the README.md file. Also, I added the person's face, hat, and the moon. Milestone 2: - Since my last commit I have changed the README.md file twice. I originally was going to try an animation but then I decided that I wanted to create a picture. - Somewhere I got stuck was thinking about how I could create the person's hair. I was thinking about it and decided that it would be better to create a hat so that is what I did. I originally wasn't sure how to create the hat but then I thought about using loops. I knew I could run the rectangle function multiple times while still being able to change the size of the rectangles so that is what I did. I looped through 3 different rectangle sizes to give the idea that the person is wearing a hat. --- README.md | 4 ++-- drawing.py | 45 +++++++++++++++++++++++++++++++++++++-------- 2 files changed, 39 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index ba88f9b..0767433 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ I want to create a person standing outside. I will make a person and a backgrou I will create the person by making the rectangle(height,width,color) and circle(radius) functions. The rectangles can be used for the person's arms and legs and the circles can be used for the person's head and eyes. I will combine them together to make the person. ### Milestone 2: -I will make the person's face and hair. I will also make clouds to show it snowing. I will use the circle function many times to make the clouds. +I will make the person's face and hat on the person's head. Also, I will make the moon by using the built in dot function. ### Milestone 3: -I will make the background. I will add grass by coloring a rectangle green that the person will be standing on and will add other background elements. +I will make the background. I will add grass by coloring a rectangle green that the person will be standing on and will make the house in the background. diff --git a/drawing.py b/drawing.py index 310de76..e499b1b 100644 --- a/drawing.py +++ b/drawing.py @@ -2,7 +2,7 @@ # ---------- # By James Berent # -# (This will make a person and the person will wave) +# (This will make a person and the person will stand next to a house) from turtle import * @@ -24,7 +24,8 @@ def rectangle(height,width,col): def triangle_facing_right(height,col): top_of_tri = (height**2+height**2)**(1/2) - color(col) + fillcolor(col) + begin_fill() forward(height) left(180) fly(height) @@ -35,23 +36,26 @@ def triangle_facing_right(height,col): right(135) fly(height) left(180) + end_fill() def triangle_facing_left(height,col): top_of_tri = (height**2+height**2)**(1/2) - color(col) + fillcolor(col) + begin_fill() forward(height) left(90) forward(height) left(135) forward(top_of_tri) left(135) + end_fill() def circ(radius): circle(radius,360) #found in section 1 link of Typeface Problem set instructions - +speed(100) rectangle(250,150,"red") #this is the torso right(90) fly(150) @@ -81,13 +85,38 @@ fly(30) right(90) circ(35) #this is the head left(90) -fly(50) +fly(40) left(90) -fly(10) +fly(12) right(180) -circ(5) +circ(5) #this is the left eye fly(25) -circ(5) +circ(5) #this is the right eye +right(90) +fly(25) +right(90) +fly(12) +right(180) +triangle_facing_right(15,"black") #this is the mouth +left(180) +fly(15) +right(180) +triangle_facing_left(15,"black") #this is the mouth +fly(45) +left(90) +fly(60) +left(90) +for num in [55,60,65,85]: #this is the hair + rectangle(10,num,"brown") + left(90) + fly(5) + right(90) +fly(400) +right(180) +dot(200,"royalblue") # makes the moon +fly(200) + + input()