Question: From definitions file: location = B6 Your task is to create a program that takes in the location (defined in the definitions file) of a
Your task is to create a program that takes in the location (defined in the definitions file) of a chess board given in a letter-number coordinate and returns the color of the square. The chess board and coordinates are given below: 7 6 5 3 2 A B CDEFGH For example, for location = . A1 , the result should be color' white', while for location = . A2 , the result should be color 'black. If a location is provided that is off the board, the result should be color -None. (Note that None is a keyword in Python not a string.) The location is case sensitive, so use uppercase letters. You may test different locations by modifying the value in definitions.py. You must first separate location into two components: letter (str) and number (int). The resulting square color is to be assigned to the variable color. Acceptable values are white' or black',both lowercase as well as None
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
