import turtle
# 1
def red_star():
turtle.fillcolor('red')
turtle.begin_fill()
for x in range(5):
turtle.forward(200)
turtle.left(144)
turtle.end_fill()
# 2
def eight_pointed_star():
for x in range(8):
turtle.left(135)
# 3
def olympic_circle():
turtle.color("blue")
turtle.penup()
turtle.goto(-110, -25)
turtle.pendown()
turtle.circle(45)
turtle.color("black")
turtle.goto(0, -25)
turtle.color("red")
turtle.goto(110, -25)
turtle.color("yellow")
turtle.goto(-55, -75)
turtle.color("green")
turtle.goto(55, -75)
turtle.goto(0, 80)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
import turtle
# 1
def red_star():
turtle.fillcolor('red')
turtle.begin_fill()
for x in range(5):
turtle.forward(200)
turtle.left(144)
turtle.end_fill()
# 2
def eight_pointed_star():
for x in range(8):
turtle.forward(200)
turtle.left(135)
# 3
def olympic_circle():
turtle.color("blue")
turtle.penup()
turtle.goto(-110, -25)
turtle.pendown()
turtle.circle(45)
turtle.color("black")
turtle.penup()
turtle.goto(0, -25)
turtle.pendown()
turtle.circle(45)
turtle.color("red")
turtle.penup()
turtle.goto(110, -25)
turtle.pendown()
turtle.circle(45)
turtle.color("yellow")
turtle.penup()
turtle.goto(-55, -75)
turtle.pendown()
turtle.circle(45)
turtle.color("green")
turtle.penup()
turtle.goto(55, -75)
turtle.pendown()
turtle.circle(45)
turtle.color("black")
turtle.penup()
turtle.goto(0, 80)
turtle.pendown()