Each square on a chess board can be described by a letter and number, such as g5

Question:

Each square on a chess board can be described by a letter and number, such as g5 in this example:

The following pseudocode describes an algorithm that determines whether a square with a given letter and number is dark (black) or light (white).
If the letter is an a, c, e, or g
If the number is odd
color = "black"
Else
color = "white"
Else
If the number is even
color = "black"
Else
color = "white"
Using the procedure in Programming Tip 3.5, trace this pseudocode with input g5.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: