Hello, you should first install the library of PyTurtle. You can type in terminal if you've GNU/Linux.
- sudo apt-get install -y python3-wxgtk4.0
And then, you can use this code. Good luck!
import turtle
# Defining instance of turtle
pen = turtle.Turtle()
wn = turtle.Screen()
#Initial position is setting
pen.penup()
pen.setposition(-275.0,-150.0)
pen.pendown()
#Red diamond shape
pen.color("red")
pen.left(60)
pen.forward(200)
pen.left(60)
pen.forward(200)
pen.left(120)
pen.forward(200)
pen.left(120)
pen.forward(200)
pen.right(120)
pen.forward(200)
pen.right(120)
pen.forward(200)
pen.right(120)
pen.forward(200)
#Go to draw circle
pen.color("white")
pen.right(90)
pen.forward(170)
pen.left(90)
pen.forward(175)
#Draw circle
pen.color("black")
pen.circle(175)
#Go to green diamond
pen.color("white")
pen.forward(175)
pen.left(90)
pen.forward(175)
pen.right(90)
#Draw green diamond
pen.color("green")
pen.forward(200)
pen.left(120)
pen.forward(200)
pen.left(120)
pen.forward(200)
pen.left(60)
pen.forward(200)
pen.left(120)
pen.forward(200)
pen.left(120)
pen.forward(200)
#Always-on-display
wn.mainloop()