SoFunction
Updated on 2024-11-21

Python graphic drawing the five Olympic rings example explanation

1. Appropriate spaces

A blank space at the beginning of a logical line indicates a logical representation of hierarchical relationships, thus determining grouping.

The statement starts at the first column of the new row

Uniformity of style, all with four spaces.

You can't just add spaces.

Olympic rings

 

#Painting the five Olympic rings

import turtle
(10) 
 
("blue")
(50)
()
(120,0)
()
("black")
(50)
()
(240,0)
()
("red")
(50)
()
(240,0)
()

()
(60,-50)
()
("yellow")
(50)

()
(180,-50)
()
("green")
(50)

That's all there is to this presentation, read more about it below and thank you for your support.