How to realize the Olympic rings by python
This article mainly introduces the relevant knowledge of python how to achieve the Olympic rings, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value. I believe you will gain something after reading this python article on how to achieve the Olympic rings. Let's take a look at it.
Code:
Import turtle
Turtle.showturtle ()
Turtle.penup ()
Turtle.goto (- 30240)
Turtle.pendown ()
Turtle.color ("red")
Turtle.write (Olympic rings, font= (Song style, 25))
Turtle.pensize (10)
Turtle.penup ()
Turtle.goto (0Pol 0)
Turtle.pendown ()
Turtle.color ("red")
Turtle.circle (100)
Turtle.penup ()
Turtle.goto (- 20050)
Turtle.pendown ()
Turtle.color ("green")
Turtle.circle (100)
Turtle.penup ()
Turtle.goto (2007.0)
Turtle.pendown ()
Turtle.color ("blue")
Turtle.circle (100)
Turtle.penup ()
Turtle.goto (- 100Lou Yu 180)
Turtle.pendown ()
Turtle.color ("yellow")
Turtle.circle (100)
Turtle.penup ()
Turtle.goto (100LMUR 180)
Turtle.pendown ()
Turtle.color ("purple")
Turtle.circle (100)
# turtle.clear () # clear the screen
Turtle.done ()
Effect picture:
This is the end of the article on "how to achieve the Olympic rings in python". Thank you for your reading. I believe you all have a certain understanding of the knowledge of "how to achieve the Olympic rings in python". If you want to learn more, you are welcome to follow the industry information channel.