import turtle # --------------------------------------------+ # Your name(s) | # CSCI 107, Assignment 9 | # Last Updated: ??, 2023 | # --------------------------------------------| # Brief description of assignment. | # --------------------------------------------+ # --------------------------------------------+ # move # --------------------------------------------+ # some_turtle: a turtle # direction: the direction the turtle should move # distance: the number of pixels to move # --------------------------------------------+ # Move the turtle the specified number of pixels # in the specified direction. # --------------------------------------------+ def move(some_turtle, direction, distance): some_turtle.setheading(direction) some_turtle.forward(distance) # --------------------------------------------- # main # --------------------------------------------- # Command Summary: # N or n: move the turtle north a specified number of pixels # S or s: move the turtle south a specified number of pixels # E or e: move the turtle east a specified number of pixels # W or w: move the turtle west a specified number of pixels # B or b: make the turtle blue # G or g: make the turtle green # R or r: make the turtle red # Y or y: make the turtle yellow # --------------------------------------------- def main(): command_string = "Bn050Ge100Rs150Yw200bN250gE300rS350yW400bn450ge500rs550yw600" drawing = turtle.Turtle() drawing.speed(0) drawing.pensize(10) drawing.hideturtle() # --------------------------------------------- main()