# ———DRILL ———
# Draw an repeatedly expanding/contracting circle
import drawSvg as draw

# Draw a frame of the animation
def draw_frame(r):
    d = draw.Drawing(250, 250, origin='center')
    d.append(draw.Circle(0, 0, r, fill='blue'))
    return d
               
# run animation
r = 0 # starting radius
R = 100 # ending radius
sign = 1 # expansion (1) or contraction (-1)
with draw.animate_jupyter(draw_frame, delay=0.01) as anim:
    while( True ):
        anim.draw_frame(r)
        if( sign == 1 ):
            r = r + 1 # expand
        else:
            r = r - 1 # contract
            
        if( r > R or r < 0 ):
            sign = -1 * sign # flip sign of expansion/contraction


# ———DRILL ———
# Write some code to determine if a number is prime.
# Print either “not prime” or “is prime”. A number is 
# prime if the only integer divisors are 1 and itself

x = 17
c = 2
while( c < x ):
    if( x % c == 0 ):
        print( "not prime" )
        break
    c = c + 1

if( c == x ):
    print( "is prime" )



