check_valid_row and check_valid_column both return a boolean - True if the row or column passed in is valid, False if not. Remember to define these functions in a chessboard.py. We will run auto-tests on these functions, so be sure to name them properly and place them in the correct files. • You must write test function for check valid row () and check valid column (). Your test functions should validate a few "normal" scenarios as well as one or two "out of bounds" situations for the rows and columns. You may name your test functions whatever you wish, but you must define them in a file named test squares.py. In this same file, also include a function called test squares () that acts as the "test driver" and calls your two test functions. Our auto-grader will use this function to interact with your test suite. You have flexibility in how you present your test results, but conciseness and ease-of-readability (or lack thereof) will influence your grade. Here's an example of what you might consider producing: Column: i, Expected: Column: A, Expected: True, Actual: True Column: B, Expected: True, Actual: True False, Actual: False Row: 1, Expected: True, Actual: True Row: 2, Expected: True, Actual: True Row: 3, Expected: True, Actual: True Your grade for this part of the assignment will be based on your solution code, your test functions provided and our own test suite, as well as manual inspection of your solution code for other rubric items (documentation, efficiency, etc.). No main () is required for this assignment. Resources: You might find the built-in ord () and chr () functions, as well as an ASCII table of characters helpful for this part of the assignment. Look here: http://www.asciitable.com/e

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

It is a python program. Make sure it works and run in IDLE 3.10. Please show the code screenshot and output screenshot.

• check_valid_row and check_valid_column both return a boolean - True if the row or column passed in is valid, False if not.
Remember to define these functions in a chessboard.py. We will run auto-tests on these functions, so be sure to name them properly and
place them in the correct files.
• You must write test function for check valid row() and check valid column (). Your test functions should validate a few "normal"
scenarios as well as one or two "out of bounds" situations for the rows and columns. You may name your test functions whatever you wish, but
you must define them in a file named test squares.py. In this same file, also include a function called test squares () that acts as the
"test driver" and calls your two test functions. Our auto-grader will use this function to interact with your test suite.
You have flexibility in how you present your test results, but conciseness and ease-of-readability (or lack thereof) will influence your grade.
Here's an example of what you might consider producing:
Column: i, Expected: False, Actual: False
Column: A, Expected: True, Actual: True
Column: B, Expected: True, Actual: True
Row: 1, Expected: True, Actual: True
Row: 2, Expected: True, Actual: True
Row: 3, Expected: True, Actual: True
Your grade for this part of the assignment will be based on your solution code, your test functions provided and our own test suite, as well as
manual inspection of your solution code for other rubric items (documentation, efficiency, etc.).
No main () is required for this assignment.
Resources: You might find the built-in ord () and chr () functions, as well as an ASCII table of characters helpful for this part of the assignment.
Look here: http://www.asciitable.com/
Transcribed Image Text:• check_valid_row and check_valid_column both return a boolean - True if the row or column passed in is valid, False if not. Remember to define these functions in a chessboard.py. We will run auto-tests on these functions, so be sure to name them properly and place them in the correct files. • You must write test function for check valid row() and check valid column (). Your test functions should validate a few "normal" scenarios as well as one or two "out of bounds" situations for the rows and columns. You may name your test functions whatever you wish, but you must define them in a file named test squares.py. In this same file, also include a function called test squares () that acts as the "test driver" and calls your two test functions. Our auto-grader will use this function to interact with your test suite. You have flexibility in how you present your test results, but conciseness and ease-of-readability (or lack thereof) will influence your grade. Here's an example of what you might consider producing: Column: i, Expected: False, Actual: False Column: A, Expected: True, Actual: True Column: B, Expected: True, Actual: True Row: 1, Expected: True, Actual: True Row: 2, Expected: True, Actual: True Row: 3, Expected: True, Actual: True Your grade for this part of the assignment will be based on your solution code, your test functions provided and our own test suite, as well as manual inspection of your solution code for other rubric items (documentation, efficiency, etc.). No main () is required for this assignment. Resources: You might find the built-in ord () and chr () functions, as well as an ASCII table of characters helpful for this part of the assignment. Look here: http://www.asciitable.com/
• File names: color_square.py, chessboard.py, test_squares.py
Positions on a chess board are identified by a letter and a number. The letter identifies the column; the number identifies the row. See the image
below.
8
7
a b c d efg h
You will provide the functions that allow us to determine:
1. if a chessboard square is either black or white, given its coordinates.
2. If the row/column is valid or not for the standard chessboard
For example, if we pass in "d" for the column and 4 for the row, your function that determines color should return the string: "BLACK". If we pass
in "k" for the column to your function that validates columns, that function should return the boolean False.
Requirements:
• Your function for validating the column should be able to accept upper or lowercase strings as parameters.
• Your functions for validating the row should be able to accept integers or strings as parameters.
• Your function that determines black-or-white may assume that the input has been validated prior to us calling it (that is a precondition) and
should return the string "BLACK" or "WHITE" based on the row/column values passed in
• You must provide three "helper functions". Two of those functions:
o check_valid_row( row) and
• check_valid_column ( column )
must be defined in the file chessboard.py:
The third function: black_or_white (row, column) must be defined in the file color_square.py
Transcribed Image Text:• File names: color_square.py, chessboard.py, test_squares.py Positions on a chess board are identified by a letter and a number. The letter identifies the column; the number identifies the row. See the image below. 8 7 a b c d efg h You will provide the functions that allow us to determine: 1. if a chessboard square is either black or white, given its coordinates. 2. If the row/column is valid or not for the standard chessboard For example, if we pass in "d" for the column and 4 for the row, your function that determines color should return the string: "BLACK". If we pass in "k" for the column to your function that validates columns, that function should return the boolean False. Requirements: • Your function for validating the column should be able to accept upper or lowercase strings as parameters. • Your functions for validating the row should be able to accept integers or strings as parameters. • Your function that determines black-or-white may assume that the input has been validated prior to us calling it (that is a precondition) and should return the string "BLACK" or "WHITE" based on the row/column values passed in • You must provide three "helper functions". Two of those functions: o check_valid_row( row) and • check_valid_column ( column ) must be defined in the file chessboard.py: The third function: black_or_white (row, column) must be defined in the file color_square.py
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education