"""
Exercise 2.4.3

Discovering Computer Science, Third Edition
Jessen Havill
"""

import turtle
import math     # math module (more in the next chapter)

def do_something(z):
    a = turtle.Turtle()
    b = turtle.Turtle()
    c = a.getscreen()
    c.setworldcoordinates(-z - 1, -z - 1, z + 1, z + 1)
    a.hideturtle()
    b.hideturtle()
    
    a.up()
    b.up()
    a.goto(-z, 0)
    b.goto(-z, 0)
    a.down()
    b.down()
    
    for d in range(-z, z + 1):
        a.goto(d, math.sqrt(z ** 2 - d ** 2))  # sqrt is square root
        b.goto(d, -math.sqrt(z ** 2  - d ** 2))
        
def main():
    do_something(100)
    
main()
