题目:绘制下面的图形

python turtle 100-61
Python 海龟绘图 100 题——第 61 题

解析:

绘制三个互相外切的圆。

答案:

方法一 使用循环绘制圆
Python
import turtle as t
for i in range(0,3):
    t.rt(90)
    for j in range(0,360):
        t.fd(0.0174*50)
        t.lt(1)
    t.lt(90)
    t.pu()
    t.fd(50)
    t.lt(120)
    t.fd(50)
    t.pd()
方法二 使用 circle 方法绘制圆
Python
import turtle as t
for i in range(0,3):
    t.rt(90)
    t.circle(50)
    t.lt(90)
    t.pu()
    t.fd(50)
    t.lt(120)
    t.fd(50)
    t.pd()