Your task is to write python program with out using function 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

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter9: Advanced Array Concepts
Section: Chapter Questions
Problem 2GZ
icon
Related questions
Question

Your task is to write python program with out using function 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

The input like pictures

Input Prompts
Output (Turtle canvas)
Enter number of cells in board: 2
Enter the width of each cell: 30
Enter the color (black or red or green or blue): black
Enter number of cells in board: 5
Enter the width of each cell: 15
Enter the color (black or red or green or blue): blue
Enter number of cells in board: 8
Enter the width of each cell: 25
Enter the color (black or red or green or blue): red
Enter number of cells in board: 1
Enter the width of each cell: 5
Enter the color (black or red or green or blue): yellow
Warning: Invalid number for the cells: 1
Ilsing default valuc of8 cells instead!
Transcribed Image Text:Input Prompts Output (Turtle canvas) Enter number of cells in board: 2 Enter the width of each cell: 30 Enter the color (black or red or green or blue): black Enter number of cells in board: 5 Enter the width of each cell: 15 Enter the color (black or red or green or blue): blue Enter number of cells in board: 8 Enter the width of each cell: 25 Enter the color (black or red or green or blue): red Enter number of cells in board: 1 Enter the width of each cell: 5 Enter the color (black or red or green or blue): yellow Warning: Invalid number for the cells: 1 Ilsing default valuc of8 cells instead!
Enter the color (black or red or green or blue): blue
Enter number of cells in board: 8
Enter the width of each cell: 25
Enter the color (black or red or green or blue): red
Enter number of cells in board: 1
Enter the width of each cell: 5
Enter the color (black or red or green or blue): yellow
Warning: Invalid number for the cells: 1
Using default value of 8 cells instead!
Warning: Invalid number for the cells width: 5
Using default value of 25 instead!
Warning: Invalid color: yellow
Using default "black" color instead!
Transcribed Image Text:Enter the color (black or red or green or blue): blue Enter number of cells in board: 8 Enter the width of each cell: 25 Enter the color (black or red or green or blue): red Enter number of cells in board: 1 Enter the width of each cell: 5 Enter the color (black or red or green or blue): yellow Warning: Invalid number for the cells: 1 Using default value of 8 cells instead! Warning: Invalid number for the cells width: 5 Using default value of 25 instead! Warning: Invalid color: yellow Using default "black" color instead!
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Function Arguments
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT