turtle simple to use - the Olympic rings

Import Turtle Turtle from 

T = Turtle () # instantiate the object
t.width (10) # Set stroke size

t.color ( 'blue') # Set stroke color
t.circle (50)
t.penup () lift the pen # since, without leaving any traces
t.forward (120)

t.pendown ()
t.color ( 'Black')
t.circle (50)

t.penup ()
t.forward (120)

t.pendown ()
t.color ( 'Red')
t.circle (50)

t.penup ()
T. Goto (60, -50)
t.pendown ()
t.color ( 'Yellow')
t.circle (50)

t.penup ()
T. GOTO (170., -50)
t.pendown ()
t.color ( 'Green')
t.circle (50)

The Olympic Rings

Guess you like

Origin www.cnblogs.com/xzlmark/p/12040678.html