Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You will be submitting three files: task 2 . py , chessboard.py , and design 2 . txt . The design will only include three
You will be submitting three files:
taskpy
chessboard.py and designtxt The design will only include three functions in your
chessboard.py
file. You will draw a chessboard based on user inputs. You will ask for the starting location and a height and width of the board. You will use
this information to draw the chessboard just a single chessboard Keep in mind that it may not be a square. The location is the top left corner
of the chessboard.
The user must enter the location, but if they do not enter a value for height or width you will use a default value of Note, that input
returns an empty string if the user just hits enter without giving input. Here is some code that you must use in your program. Paste this code
in your
taskpy file. Only fill in the indicated spots. Do not modify or remove the existing code.tat Add Import Statements as needed :
End Add Import Statements
def main:
asts Add Code to get input from user asta
#at# End Add Code to get input from user atan
If width and height :
dranchessboardstartx starty
elif helight n :
drawchessboardstartx start y widthintwidth
elif width n :
dranchessboardstartx start heightintheight
else:
dranchessboardstartx start intwidth intheight
main
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