Question: 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
