Answered step by step
Verified Expert Solution
Link Copied!

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:
task2.py,
chessboard.py, and design2.txt. 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 (x,y) 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 250. Note, that input0
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
task2.py file. Only fill in the indicated spots. Do not modify or remove the existing code.t*at Add Import Statement(s) as needed :******
** End Add Import Statement(s)****
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 =**":
dran_chessboard(start_x, start_y)
elif helight =n "*:
draw_chessboard(start_x, start y, width=int(width))
elif width =n "?:
dran_chessboard(start_x, start y, height=int(height))
else:
dran_chessboard(start_x, start y, int(width), int(height))
main()
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Logics For Databases And Information Systems

Authors: Jan Chomicki ,Gunter Saake

1st Edition

1461375827, 978-1461375821

More Books

Students also viewed these Databases questions