Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions NigeriaFlag.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
t = turtle.Turtle()

# Use the shape method for the t object to switch to any shape to draw
#t.shape("arrow")
# t.shape("arrow")

# Define/ Create a variable for diagram
fullshape = 360


# Use the penup object to not draw on the screen
# Use the penup object to not draw on the screen
t.penup()

# Assign a color to you drawing and shape
Expand All @@ -20,20 +19,23 @@
# Use the time module to wait before running the program.
time.sleep(5)

# Create a function for the Drawing
# hide the turtle pen
t.hideturtle()


# Create a function for the Drawing
def penDown():

t.pensize(3)
t.pendown()
t.forward(100)
t.left(fullshape/4)

t.left(fullshape / 4)


# Create a function to not draw
def penUp():

t.penup()
t.forward(100)
t.left(fullshape/4)
t.left(fullshape / 4)


# Here is the begining of the function Line
Expand All @@ -44,16 +46,15 @@ def penUp():
# Create a for loop to draw the square shape
for _ in range(0, 4):
penDown()

# End the color inside the square shape
t.end_fill()
# print(t.position())

# Here is the blank/white flag
#placing the position for the white shape
# placing the position for the white shape
t.goto(-50.0, 0.00)
for noline in range(4):

penUp()

# print the position of the box after drawing the shape
Expand All @@ -64,12 +65,11 @@ def penUp():
t.begin_fill()
# This is the function for the third side of the flag
for thr in range(4):

penDown()

t.end_fill()
t.goto(140, 0.00)
print(t.position())

# exits the Turtle display once the task is completed upon clicking the window
turtle.exitonclick()