Files
project_drawing/drawing.py
mbhatti4 e7fa4e9eb7 Submit 2:
Here i wrote the fucntion for the body. I first positioned myself on the canvas where i wanted to start drawing and then called the oval function to draw it out.

I am struggling to get the program to draw. I don't think there is any errors in my code, as it is farily simple, but when i run it, it justdraws a weird shape.
2025-10-05 16:47:35 -04:00

41 lines
712 B
Python

# drawing.py
# ----------
# By Mishaal
#
# The program draws a butterfly
from turtle import *
from turtle import forward, right
from superturtle.movement import fly, no_delay
fly(-150, 150)
with no_delay():
for i in range(720):
forward(300)
right(71)
def draw_oval(width, height, color):
fillcolor(color)
begin_fill()
for i in range(2):
circle(width, 90)
circle(height, 90)
end_fill()
def draw_wing(x, y, width, height, color, angle):
penup()
goto(x, y)
setheading(angle)
pendown()
draw_oval(t, width, height, color)
def draw_body():
penup()
goto(0,-100)
setheading(90)
pendown()
draw_oval(10,45,"black")
input()