import turtle
import random
turtle.shape('turtle')
turtle.width(3)
for i in range(8):
turtle.right(45)
color = random.choice(['blue', 'red', 'yellow', 'green', 'gray', 'brown', 'purple'])
turtle.color(color)
for i in range(4):
turtle.forward(100)
turtle.right(90)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
import turtle
import random
turtle.shape('turtle')
turtle.width(3)
for i in range(8):
turtle.right(45)
color = random.choice(['blue', 'red', 'yellow', 'green', 'gray', 'brown', 'purple'])
turtle.color(color)
for i in range(4):
turtle.forward(100)
turtle.right(90)