https://github.com/pythonlessons/quadigi_task
https://github.com/pythonlessons/quadigi_task
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/pythonlessons/quadigi_task
- Owner: pythonlessons
- Created: 2022-08-10T19:16:56.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-12T05:53:16.000Z (over 3 years ago)
- Last Synced: 2025-01-13T04:42:00.119Z (12 months ago)
- Language: Python
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# QuaDigi_task Exercise
## Part 1
You were given a map (2 dimensional grid) where each cell is either forest (marked as X) or grassland (marked as O).
Write a script that gets number of isolated forests on the map. Forest is formed of cells X that are connected in one of 8 directions. In case code is not working, please explain the search strategy.
(Example on next page)
## Example:
There are two forests in the map (red and green) bellow:
0X0X0
00XX0
00000
0XX00
## Part 2
Add some tests (2-3) for the task above.
It would be preferable to use unittest library to create assertions for methods.
It would be nice if the tests are written in a separate file but not necessary.