Data Structure & Algorithm: Level-1 Problem #47. Chessboard Square Color

Given a position on a chessboard, find out the color for it based on the image below. The position string starts with a letter from A to H, followed by a number from 1 to 8.

Sample Input:

D7

Sample Output:

White

Chessboard

数据结构和算法:初级练习题 #47 – 棋盘格子颜色

给定一个国际象棋棋盘的位置,根据上图找出这个格子的颜色。位置字符串以大写字母A到H开始,以数字1到8结束。

输入样例:

D7

输出样例:

White

Python Solution

Chessboard Square Color