yinyang2.py
# -*- coding: utf-8 -*-
from turtle import *
 
def jump(distanz, winkel=0):
    penup()
    right(winkel)
    forward(distanz)
    left(winkel)
    pendown()
 
def yin(radius, farbe, gegenfarbe):
    fillcolor(farbe)
    begin_fill()
    circle(radius / 2, 180)
    circle(radius, 180)
    left(180)
    circle(-radius / 2,180)
    end_fill()
    jump(radius / 2, -90)
    dot(radius / 4, gegenfarbe)
    jump(radius / 2, 90)
 
def yinyang(radius):
    pensize(3)
    yin(radius, "white", "black")
    left(180)
    yin(radius, "black", "white")
    left(180)
 
reset()
yinyang(125)
hideturtle()
exitonclick()