Answered step by step
Verified Expert Solution
Question
1 Approved Answer
3. Extra credit: print the color of a square on a chessboard. The name of the Python code file will be FirstnameLastname_01_03.py. A chessboard square
3. Extra credit: print the color of a square on a chessboard. The name of the Python code file will be FirstnameLastname_01_03.py. A chessboard square is identified by . For example, al is the black square at the lower left corner, e4 is the white Page 1 of 1 a b c d e f g h square near the middle of the board, and h8 is the black square at the upper right corner. (See figure.) 3.1 3.2 3.3 Print a multi-line message explaining what the program does and the format of the input. Prompt the user to enter two characters, the first one a letter, the second one a digit. Examples of input are given above. Ensure the first character is in the range of a-h and the second one is in the range of 1-8. If not print an error message and exit the program. From the letter and digit combination determine the color of the square and print the result to the user with a message like "Square e4 is white" or "Square do is black." Test your program with invalid squares like j5 or a9. Exit the program. Exit the proci 3.4 3.5 3.6 Hint: first determine the column, then determine the row. This problem is from The Python Workbook, by Ben Stephenson, page 20, exercise 45
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started