Q1: Draw the Chessboard
Fill in draw_chessboard()
with a two-dimensional loop that calls the given draw_chessboard_cell(t, x, y)
with 64 x,y pairs.
Q2: is_prime(n)
Write a function is_prime
that takes an integer n
and determines whether any numbers besides n
and 1
evenly divide it.
- Consider zero not prime.
- Consider a negative number prime if it is prime when positive.