he progam below was created by your experts and suppose create a pattern using nested loops. Your initial needs to appear at least eight times in the pattern and pattern doesn't matter. and it was good created but i received comment saying: - this is not using nested loops. Can someone please fix it the code below by using NESTED LOOPS? import turtle
The progam below was created by your experts and suppose create a pattern using nested loops. Your initial needs to appear at least eight times in the pattern and pattern doesn't matter. and it was good created but i received comment saying:
- this is not using nested loops.
Can someone please fix it the code below by using NESTED LOOPS?
import turtle
# Setting background color
screen = turtle.Screen()
screen.bgcolor("skyblue")
#drawing letter 'M' in different colors
turtle.penup()
turtle.pensize(9)
turtle.goto(-300,50)
turtle.right(90)
turtle.forward(300)
for i in range (1,4):
turtle.color("dark blue")
turtle.pendown()
turtle.backward(60)
turtle.left(45)
turtle.forward(40)
turtle.left(90)
turtle.forward(40)
turtle.right(135)
turtle.forward(60)
turtle.backward(60)
for i in range (1,4):
turtle.color("red")
turtle.pendown()
turtle.backward(60)
turtle.left(45)
turtle.forward(40)
turtle.left(90)
turtle.forward(40)
turtle.right(135)
turtle.forward(60)
turtle.backward(60)
for i in range (1,3):
turtle.color("yellow")
turtle.pendown()
turtle.backward(60)
turtle.left(45)
turtle.forward(40)
turtle.left(90)
turtle.forward(40)
turtle.right(135)
turtle.forward(60)
turtle.backward(60)
Step by step
Solved in 7 steps with 4 images