https://github.com/mrmurphy/simple-python-exercises
https://github.com/mrmurphy/simple-python-exercises
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mrmurphy/simple-python-exercises
- Owner: mrmurphy
- Created: 2013-05-18T14:13:35.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2013-05-21T03:51:17.000Z (about 13 years ago)
- Last Synced: 2024-05-01T20:31:50.841Z (about 2 years ago)
- Language: Python
- Size: 441 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple Exercises in Python
These exercises were designed to be run in Python 3+, but should be compatible with 2.7+
# Possible improvements that could be made:
- A more efficient algorithm for searching out neighboring bombs. Execution time for large data sets is currently unacceptable.
- Replace recursion in clearing-the-way.py with an iterative algorithm. Python is not optimized for tail recursion. Iteration is considered a more "pythonic" way of doing things.
# How to make sure they're working:
Running `minesweeper.py` and `clearing-the-way.py` will load the `stdin#.txt` files that are already in the directory with them. The `#` is hard-coded in the script. If you want to add more tests, just jump to the bottom of each script and add the number of the test to the line `for i in (#,)`.
Each script will write out a file called `newout#.txt` that can be compared for accuracy with `stdout#.txt`