示例#1
0
circleList = []
i = 1
j = 0

firstPoint = Point(500, 500)
myColor = Color(0, 0, 153)

firstCircle = Circle(firstPoint, 40, myColor)
circleList.append(firstCircle)

while i < 100:
    x = randint(0, 1000)
    y = randint(0, 1000)
    r = randint(0, 255)
    g = randint(0, 255)
    b = randint(0, 255)

    tempPoint = Point(x, y)
    tempColor = Color(r, g, b)

    tempCircle = Circle(tempPoint, 40, tempColor)
    circleList.append(str(tempCircle.SVG()))
    i += 1

while j < len(circleList):
    circleList[j].SVG()
    j += 1

print('</svg>')
print("</body></html>")