Computers and Technology

Your task is to write python program that draws a board with alternating dark cells (black or some other color) and white cells. The number of cells to use in each row or column, width of each cell, and color to use for dark cells (either black, red, green, or blue) should be collected from the keyboard after showing appropriate input prompt messages. Note the following requirements: • The program can either start with a dark (colored) cell or white cell. In the figure below, the board starts with dark cell.
• The program should draw an N by N board where N is the number of cells in a row (or a column). Note that the shape of board and the cells are both square.
• The program should draw a border (black line) around the board as shown in the figure.
• The program must prompt for input from the keyboard and then validate the input as follows:
o Number of cells in each row or column must be positive number > 1
o Width of each cell must be a positive number > 9
o The color can be one of 4 colors only: black, red, green or blue.
• If any of the provided input is invalid then the program should show a warning message and use the default value for that variable as follows:

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 04:00, yolo1430
Acetylene is a gas which burns rapidly on its own, and is considered highly explosive. a) true b) false
Answers: 2
image
Computers and Technology, 22.06.2019 19:30, bstine6678
When creating a presentation in libre office impress, where does the editing of slides take place? a. the slides panel b. the center panel c. the tasks panel, under the masters pages tab d. the tasks panel, under the layouts tab
Answers: 1
image
Computers and Technology, 22.06.2019 23:30, keviongardner
The next button in the review section shows the next available comment. next slide with no comment. previous comment. edited comment.
Answers: 1
image
Computers and Technology, 23.06.2019 00:00, dubouuu
Donna and her team of five have invented a new gadget for the science exhibition in their college. which intellectual property right will protect their invention?
Answers: 1
Do you know the correct answer?
Your task is to write python program that draws a board with alternating dark cells (black or some o...

Questions in other subjects: