+ 1

What is the error in this code?? The error is in 8 line

from Turtle import * def draw_multicolor_square(t, sz): for i in ["red", "purple", "hotpink", "blue"]: t.color(i) t.forward(sz) t.left(90) wn = turtle.Screen() wn.bgcolor("lightgreen") tess = turtle.Turtle() tess.pensize(3) size = 20 for i in range(15): draw_multicolor_square(tess, size) size =size + 10 tess.forward(10) tess.right(18) wn.mainloop()

4th Oct 2019, 12:43 PM
roza alandalib
roza alandalib - avatar
3 Answers
+ 1
It don't also work ... I did all the changes but it still don't work
5th Oct 2019, 11:11 AM
roza alandalib
roza alandalib - avatar
+ 1
It tell me that no module is called 'turtle '
5th Oct 2019, 11:14 AM
roza alandalib
roza alandalib - avatar
0
# Try this code, and your code output is very Beautiful from turtle import * def draw_multicolor_square(t, sz): for i in ["red", "purple", "hotpink", "blue"]: t.color(i) t.forward(sz) t.left(90) wn = Screen() wn.bgcolor("lightgreen") tess = Turtle() tess.pensize(3) size = 20 for i in range(15): draw_multicolor_square(tess, size) size =size + 10 tess.forward(10) tess.right(18) wn.mainloop()
5th Oct 2019, 7:00 AM
Abhay Singh
Abhay Singh - avatar