Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to realize the Olympic rings by python

Shulou Source: shulou.com Published: 2022-06-01 04:07:19 10月03日 Update

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.

Tags: Olympic Games five rings content knowledge articles code value Song style screen easy to operate effect effect articles easy to understand more read it industry information channels channels Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Apple MariaDB Huawei Microsoft