I need help with seeing where i am going wrong in my python programming. I keep receiving a name error and im uncertain how to fix it. I attached the homework assignment and the code error i keep rec

I need help with seeing where i am going wrong in my python programming. I keep receiving a name error and im uncertain how to fix it.

I attached the homework assignment and the code error i keep receiving. I also entered my code below .

here’s my code

# Illustrate calling a turtle function

#Modified by Tajah Kenner on 11/04/2021

import turtle

# Define functions

def drawMulticolorSquare(t, sz):

“””Make turtle t draw a multicolor square of with side sz.”””

for i in [‘white’,’lightblue’,’pink’,’black’]:

t.color(i)

t.forward(sz)

t.left(90)

def main():

“””This is where you set up the window and its attributes,

define your variables, and create your turtle(s).”””

wn = turtle.Screen()

wn.bgcolor(“yellow”)

jessica = turtle.Turtle()           # create jessica and set some attributes

jessica.pensize(3)

size = 10                     # size of the smallest square

for i in range(25):

drawMulticolorSquare(jessica, size)

size = size +3            # increase the size for next time

jessica.forward(10)             # move tess along a little

jessica.left(18)               # and give her some extra turn

wn.exitonclick()

# Call main function – should be last statement in your file

main()

Leave a Comment

Your email address will not be published. Required fields are marked *

Let us offer you affordable instant help with your coursework, homework, essay or assignment!