about | help | code help+videos | done | prefs |
getChessSquareColor
Write a getChessSquareColor() function that has parameters column and row.
The function either returns 'black' or 'white' depending on the color at the specified column and row.
Chess boards are 8 x 8 spaces in size, and the columns and rows in this program begin at 0 and end at 7. getChessSquareColor(0, 0) → 'white' getChessSquareColor(1, 0) → 'black' getChessSquareColor(0, 1) → 'black' ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 201 Post-solution available
Copyright Nick Parlante 2017 - privacy